Skip to content

Commit

Permalink
fix: prevent Prism calling highlightAll (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
BuptStEve authored Nov 27, 2019
1 parent 1482991 commit 075d0e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuepress-plugin-demo-code",
"version": "0.4.1",
"version": "0.4.2",
"description": "📝 Demo and code plugin for vuepress",
"main": "src/index.js",
"files": [
Expand Down
5 changes: 3 additions & 2 deletions src/highlight.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/markdown/lib/highlight.js

const prism = require('prismjs')
const escapeHtml = require('escape-html')
const loadLanguages = require('prismjs/components/index')

// prevent Prism calling `highlightAll`
prism.manual = true

// loadLanguages(['markup', 'css', 'javascript'])

function wrap (code, lang) {
Expand Down

0 comments on commit 075d0e4

Please sign in to comment.