Skip to content

Commit 38e7c65

Browse files
committed
fix #39 space in code
1 parent ebf9d32 commit 38e7c65

File tree

3 files changed

+267
-191
lines changed

3 files changed

+267
-191
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
},
3030
"main": "dist/markdown-it-vue.umd.min.js",
3131
"dependencies": {
32-
"echarts": "^4.9.0",
33-
"flowchart.js": "^1.14.1",
32+
"echarts": "^5.0.0",
33+
"flowchart.js": "^1.15.1",
3434
"font-awesome-icon-chars": "^2.6.0",
3535
"github-markdown-css": "^4.0.0",
36-
"highlight.js": "^10.2.1",
37-
"markdown-it": "^11.0.1",
36+
"highlight.js": "^10.4.1",
37+
"markdown-it": "^13.0.3",
3838
"markdown-it-abbr": "^1.0.4",
3939
"markdown-it-container": "^3.0.0",
4040
"markdown-it-deflist": "^2.1.0",
41-
"markdown-it-emoji": "^1.4.0",
41+
"markdown-it-emoji": "^2.0.0",
4242
"markdown-it-footnote": "^3.0.1",
4343
"markdown-it-github-toc": "^3.2.4",
4444
"markdown-it-ins": "^3.0.0",
@@ -51,18 +51,18 @@
5151
"markdown-it-sup": "^1.0.0",
5252
"markdown-it-task-lists": "^2.1.1",
5353
"markdown-it-toc-and-anchor": "^4.1.2",
54-
"mermaid": "^8.8.1",
54+
"mermaid": "^8.8.4",
5555
"vue": "^2.6.12"
5656
},
5757
"devDependencies": {
58-
"@vue/cli-plugin-babel": "^4.5.6",
59-
"@vue/cli-plugin-eslint": "^4.5.6",
60-
"@vue/cli-service": "^4.5.6",
58+
"@vue/cli-plugin-babel": "^4.5.9",
59+
"@vue/cli-plugin-eslint": "^4.5.9",
60+
"@vue/cli-service": "^4.5.9",
6161
"babel-eslint": "^10.1.0",
62-
"eslint": "^7.10.0",
63-
"eslint-plugin-vue": "^7.0.0",
62+
"eslint": "^7.16.0",
63+
"eslint-plugin-vue": "^7.3.0",
6464
"vue-cli-plugin-component-lib": "^0.1.6",
65-
"vue-cli-plugin-webpack-bundle-analyzer": "^2.0.0",
65+
"vue-cli-plugin-webpack-bundle-analyzer": "^4.0.0",
6666
"vue-template-compiler": "^2.6.12"
6767
},
6868
"eslintConfig": {

src/markdown-it-highlight.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ hljs.registerLanguage('erlang-repl', ErlangRepl)
9999
const highlightPlugin = md => {
100100
md.renderer.rules.fence = (tokens, idx) => {
101101
const token = tokens[idx]
102-
const code = token.content.trim()
102+
const code = token.content
103103
const lang = token.info
104104
const langObj = hljs.getLanguage(lang)
105105
let cnt
@@ -108,7 +108,8 @@ const highlightPlugin = md => {
108108
} else {
109109
cnt = hljs.highlightAuto(code).value
110110
}
111-
return `<pre><code class="hljs">${cnt}</code></pre>`
111+
112+
return `<pre class="hljs"><code>${cnt}</code></pre>`
112113
}
113114
}
114115

0 commit comments

Comments
 (0)