From fd1b9ec8ecd499a62e8b4267dd40c019d9a06559 Mon Sep 17 00:00:00 2001 From: Barchiel <1541446281@qq.com> Date: Wed, 13 Mar 2019 16:46:02 +0800 Subject: [PATCH] fix: PrismJs can't read styl style .styl file use stylus code style --- packages/@vuepress/markdown/lib/highlight.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/@vuepress/markdown/lib/highlight.js b/packages/@vuepress/markdown/lib/highlight.js index ea974db112..b1a4719017 100644 --- a/packages/@vuepress/markdown/lib/highlight.js +++ b/packages/@vuepress/markdown/lib/highlight.js @@ -39,6 +39,10 @@ module.exports = (str, lang) => { if (lang === 'yml') { lang = 'yaml' } + if (lang === 'styl') { + lang = 'stylus' + } + if (!prism.languages[lang]) { try { loadLanguages([lang])