Skip to content

Commit

Permalink
升级highlight.js marked (#1473)
Browse files Browse the repository at this point in the history
* 升级highlight.js marked

* 升级highlight.js marked到新版本的兼容
  • Loading branch information
tesun committed Jul 14, 2023
1 parent 55264c1 commit 1cc3d91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"core-js": "^3.6.5",
"echarts": "5.3.2",
"element-plus": "^2.3.4",
"highlight.js": "^10.6.0",
"marked": "^2.0.0",
"highlight.js": "^11.8.0",
"marked": "^5.1.0",
"mitt": "^3.0.0",
"nprogress": "^0.2.0",
"path": "^0.12.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</template>

<script setup>
import marked from 'marked'
import {marked} from 'marked'
import hljs from 'highlight.js'
import 'highlight.js/styles/atelier-plateau-light.css'
import 'highlight.js/styles/atom-one-dark.css'
import { ElMessage } from 'element-plus'
import { onMounted, ref } from 'vue'
Expand All @@ -38,7 +38,8 @@ onMounted(() => {
sanitize: false,
smartLists: true,
smartypants: false,
xhtml: false
xhtml: false,
langPrefix:"hljs language-"
})
for (const key in props.previewCode) {
if (activeName.value === '') {
Expand Down

0 comments on commit 1cc3d91

Please sign in to comment.