提交 cc441d3a 编写于 作者: D DCloud_LXH

feat: 代码 uts 高亮

上级 824be832
const path = require('path');
const { slugify } = require('@vuepress/shared-utils')
const highlight = require('@vuepress/markdown/lib/highlight')
const translatePlugin = require('./markdown/translate')
const headerPlugin = require('./markdown/header')
const createSidebar = require('./markdown/createSidebar')
......@@ -73,6 +74,14 @@ const config = {
},
extractHeaders: ['h1', 'h2', 'h3', 'h4'],
chainMarkdown (config) {
const extensionMap = {
uts: 'ts'
}
config.options.highlight((str, lang) => {
const extension = extensionMap[lang]
return highlight(str, extension || lang)
})
config
.plugin('translate')
.use(translatePlugin)
......
......@@ -9407,10 +9407,10 @@ vuepress-plugin-zooming@^1.1.8:
dependencies:
zooming "^2.1.1"
vuepress-theme-uni-app-test@^1.3.22:
version "1.3.22"
resolved "https://registry.npmmirror.com/vuepress-theme-uni-app-test/-/vuepress-theme-uni-app-test-1.3.22.tgz#28e858c8cb52ba0c629974d7403e0f55d289b958"
integrity sha512-wdkg9aPH9ia0GidIKB0g3BU66DK6hS30bOKKpT9oNnps+uIDk33Pl7FaUhxDr5TE+yFyWkCbXu+cmDJtYaM8lw==
vuepress-theme-uni-app-test@^1.3.23:
version "1.3.23"
resolved "https://registry.npmmirror.com/vuepress-theme-uni-app-test/-/vuepress-theme-uni-app-test-1.3.23.tgz#1668a56d85d3569eed6ca06a38ff5de60ca07638"
integrity sha512-yXNxC6/drMAOn5Ih5Jb13dAs1upFsM6f0id84WFgy5e7oOQ2Mq5GO6Z85wWKORvG9V1qv/kTJKdVK7kGr/xLmA==
dependencies:
"@vuepress/plugin-back-to-top" "^1.9.5"
"@vuepress/theme-default" "^1.8.2"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册