Skip to content

Commit deca402

Browse files
authored
adds YAML to list of automatically highlighted languages for code blocks (#960)
Resolves: rdar://157242405
1 parent 77d966b commit deca402

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/setup-utils/vue-config-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function baseChainWebpack(config) {
6363
}]);
6464

6565
// Limit highlight.js to only the necessary languages
66-
const builtinLanguages = 'bash|c|s?css|cpp|diff|http|java|llvm|perl|php|python|ruby|xml|javascript|json|markdown|objectivec|shell|swift';
66+
const builtinLanguages = 'bash|c|s?css|cpp|diff|http|java|llvm|perl|php|python|ruby|xml|javascript|json|markdown|objectivec|shell|swift|yaml';
6767
const envLanguages = (process.env.VUE_APP_HLJS_LANGUAGES ?? '').split(',').join('|');
6868
config
6969
.plugin('LanguagesPlugin')

src/utils/syntax-highlight.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const Languages = {
3737
shell: ['console', 'shellsession'],
3838
swift: [],
3939
xml: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist', 'wsf', 'svg'],
40+
yaml: ['yml', 'yaml'],
4041
// load more languages from the environment
4142
...(
4243
process.env.VUE_APP_HLJS_LANGUAGES

0 commit comments

Comments
 (0)