@vuepress/markdown 2.0.0-beta.50 → 2.0.0-beta.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +28 -28
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -259,7 +259,7 @@ var codePlugin = (md, {
|
|
|
259
259
|
const lineNumbersCode = lines.map(() => `<div class="line-number"></div>`).join("");
|
|
260
260
|
result = `${result}<div class="line-numbers" aria-hidden="true">${lineNumbersCode}</div>`;
|
|
261
261
|
}
|
|
262
|
-
result = `<div class="${languageClass}
|
|
262
|
+
result = `<div class="${languageClass}${useLineNumbers ? " line-numbers-mode" : ""}" data-ext="${language.ext}">${result}</div>`;
|
|
263
263
|
return result;
|
|
264
264
|
};
|
|
265
265
|
if (vPreInline) {
|
|
@@ -480,9 +480,6 @@ var createMarkdown = ({
|
|
|
480
480
|
...markdownItOptions,
|
|
481
481
|
html: true
|
|
482
482
|
});
|
|
483
|
-
if (emoji !== false) {
|
|
484
|
-
md.use(emojiPlugin, emoji);
|
|
485
|
-
}
|
|
486
483
|
if (anchor !== false) {
|
|
487
484
|
md.use(anchorPlugin, {
|
|
488
485
|
level: [1, 2, 3, 4, 5, 6],
|
|
@@ -496,27 +493,18 @@ var createMarkdown = ({
|
|
|
496
493
|
...anchor
|
|
497
494
|
});
|
|
498
495
|
}
|
|
499
|
-
if (
|
|
500
|
-
md.use(
|
|
501
|
-
level: [2, 3],
|
|
502
|
-
slugify,
|
|
503
|
-
linkTag: "router-link",
|
|
504
|
-
...toc
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
if (headers !== false) {
|
|
508
|
-
md.use(headersPlugin, {
|
|
509
|
-
level: [2, 3],
|
|
510
|
-
slugify,
|
|
511
|
-
...headers
|
|
512
|
-
});
|
|
496
|
+
if (assets !== false) {
|
|
497
|
+
md.use(assetsPlugin, assets);
|
|
513
498
|
}
|
|
514
|
-
if (
|
|
515
|
-
md.use(
|
|
499
|
+
if (code !== false) {
|
|
500
|
+
md.use(codePlugin, code);
|
|
516
501
|
}
|
|
517
502
|
if (component !== false) {
|
|
518
503
|
md.use(componentPlugin);
|
|
519
504
|
}
|
|
505
|
+
if (emoji !== false) {
|
|
506
|
+
md.use(emojiPlugin, emoji);
|
|
507
|
+
}
|
|
520
508
|
if (frontmatter !== false) {
|
|
521
509
|
md.use(frontmatterPlugin, {
|
|
522
510
|
...frontmatter,
|
|
@@ -527,20 +515,32 @@ var createMarkdown = ({
|
|
|
527
515
|
}
|
|
528
516
|
});
|
|
529
517
|
}
|
|
530
|
-
if (
|
|
531
|
-
md.use(
|
|
518
|
+
if (headers !== false) {
|
|
519
|
+
md.use(headersPlugin, {
|
|
520
|
+
level: [2, 3],
|
|
521
|
+
slugify,
|
|
522
|
+
...headers
|
|
523
|
+
});
|
|
532
524
|
}
|
|
533
|
-
if (
|
|
534
|
-
md.use(
|
|
525
|
+
if (importCode !== false) {
|
|
526
|
+
md.use(importCodePlugin, importCode);
|
|
535
527
|
}
|
|
536
528
|
if (links !== false) {
|
|
537
529
|
md.use(linksPlugin, links);
|
|
538
530
|
}
|
|
539
|
-
if (
|
|
540
|
-
md.use(
|
|
531
|
+
if (sfc !== false) {
|
|
532
|
+
md.use(sfcPlugin, sfc);
|
|
541
533
|
}
|
|
542
|
-
if (
|
|
543
|
-
md.use(
|
|
534
|
+
if (toc !== false) {
|
|
535
|
+
md.use(tocPlugin, {
|
|
536
|
+
level: [2, 3],
|
|
537
|
+
slugify,
|
|
538
|
+
linkTag: "router-link",
|
|
539
|
+
...toc
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
if (title !== false) {
|
|
543
|
+
md.use(titlePlugin);
|
|
544
544
|
}
|
|
545
545
|
return md;
|
|
546
546
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/markdown",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.52",
|
|
4
4
|
"description": "Markdown package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@mdit-vue/plugin-component": "^0.
|
|
31
|
-
"@mdit-vue/plugin-frontmatter": "^0.
|
|
32
|
-
"@mdit-vue/plugin-headers": "^0.
|
|
33
|
-
"@mdit-vue/plugin-sfc": "^0.
|
|
34
|
-
"@mdit-vue/plugin-title": "^0.
|
|
35
|
-
"@mdit-vue/plugin-toc": "^0.
|
|
36
|
-
"@mdit-vue/shared": "^0.
|
|
37
|
-
"@mdit-vue/types": "^0.
|
|
30
|
+
"@mdit-vue/plugin-component": "^0.11.1",
|
|
31
|
+
"@mdit-vue/plugin-frontmatter": "^0.11.1",
|
|
32
|
+
"@mdit-vue/plugin-headers": "^0.11.1",
|
|
33
|
+
"@mdit-vue/plugin-sfc": "^0.11.1",
|
|
34
|
+
"@mdit-vue/plugin-title": "^0.11.1",
|
|
35
|
+
"@mdit-vue/plugin-toc": "^0.11.1",
|
|
36
|
+
"@mdit-vue/shared": "^0.11.0",
|
|
37
|
+
"@mdit-vue/types": "^0.11.0",
|
|
38
38
|
"@types/markdown-it": "^12.2.3",
|
|
39
39
|
"@types/markdown-it-emoji": "^2.0.2",
|
|
40
|
-
"@vuepress/shared": "2.0.0-beta.
|
|
41
|
-
"@vuepress/utils": "2.0.0-beta.
|
|
40
|
+
"@vuepress/shared": "2.0.0-beta.52",
|
|
41
|
+
"@vuepress/utils": "2.0.0-beta.52",
|
|
42
42
|
"markdown-it": "^13.0.1",
|
|
43
|
-
"markdown-it-anchor": "^8.6.
|
|
43
|
+
"markdown-it-anchor": "^8.6.5",
|
|
44
44
|
"markdown-it-emoji": "^2.0.2",
|
|
45
45
|
"mdurl": "^1.0.1"
|
|
46
46
|
},
|