@8btc/mditor 0.0.26 → 0.0.27
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.css +2 -2
- package/dist/index.js +3 -26
- package/dist/index.min.js +1 -1
- package/dist/js/lute/lute.min.js +3 -3
- package/dist/method.js +3 -26
- package/dist/method.min.js +1 -1
- package/package.json +1 -1
- package/src/ts/markdown/customRender.ts +1 -1
- package/src/ts/markdown/previewRender.ts +1 -2
- package/src/ts/util/attachLineNumbers.ts +1 -20
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v0.0.
|
|
2
|
+
* Vditor v0.0.27 - A markdown editor written in TypeScript.
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
/*!
|
|
28
|
-
* Vditor v0.0.
|
|
28
|
+
* Vditor v0.0.27 - A markdown editor written in TypeScript.
|
|
29
29
|
*
|
|
30
30
|
* MIT License
|
|
31
31
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v0.0.
|
|
2
|
+
* Vditor v0.0.27 - A markdown editor written in TypeScript.
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -2579,7 +2579,6 @@ function renderCustomComponents(element, customComponents) {
|
|
|
2579
2579
|
Object.keys(customComponents).forEach(function (tagName) {
|
|
2580
2580
|
var component = customComponents[tagName];
|
|
2581
2581
|
var customElements = element.querySelectorAll(tagName);
|
|
2582
|
-
console.log(element, customComponents, "customComponents");
|
|
2583
2582
|
// 反向遍历以避免 DOM 修改时的索引问题
|
|
2584
2583
|
Array.from(customElements)
|
|
2585
2584
|
.reverse()
|
|
@@ -2832,7 +2831,6 @@ var previewRender = function (previewElement, markdown, options) { return __awai
|
|
|
2832
2831
|
_a.sent();
|
|
2833
2832
|
_a.label = 8;
|
|
2834
2833
|
case 8:
|
|
2835
|
-
console.log(previewElement, "previewElement");
|
|
2836
2834
|
customRender(previewElement, mergedOptions.customComponents || {});
|
|
2837
2835
|
(0,setContentTheme/* setContentTheme */.Z)(mergedOptions.theme.current, mergedOptions.theme.path);
|
|
2838
2836
|
if (mergedOptions.anchor === 1) {
|
|
@@ -2906,7 +2904,6 @@ var previewRender = function (previewElement, markdown, options) { return __awai
|
|
|
2906
2904
|
.querySelectorAll(".language-math")
|
|
2907
2905
|
.forEach(function (mathEl) {
|
|
2908
2906
|
var mathSource = mathEl.getAttribute("data-math");
|
|
2909
|
-
console.log(mathEl.tagName, "mathEl");
|
|
2910
2907
|
if (mathSource) {
|
|
2911
2908
|
if (mathEl.tagName === "SPAN") {
|
|
2912
2909
|
var textNode = document.createTextNode("$".concat(mathSource, "$"));
|
|
@@ -3069,7 +3066,7 @@ var Vditor = /** @class */ (function () {
|
|
|
3069
3066
|
/* harmony export */ "H": () => (/* binding */ _VDITOR_VERSION),
|
|
3070
3067
|
/* harmony export */ "g": () => (/* binding */ Constants)
|
|
3071
3068
|
/* harmony export */ });
|
|
3072
|
-
var _VDITOR_VERSION = "0.0.
|
|
3069
|
+
var _VDITOR_VERSION = "0.0.27";
|
|
3073
3070
|
|
|
3074
3071
|
var Constants = /** @class */ (function () {
|
|
3075
3072
|
function Constants() {
|
|
@@ -3371,7 +3368,7 @@ var Constants = /** @class */ (function () {
|
|
|
3371
3368
|
"c#",
|
|
3372
3369
|
"bat",
|
|
3373
3370
|
];
|
|
3374
|
-
Constants.CDN = "https://webcdn.wujieai.com/vditor@".concat("0.0.
|
|
3371
|
+
Constants.CDN = "https://webcdn.wujieai.com/vditor@".concat("0.0.27");
|
|
3375
3372
|
Constants.MARKDOWN_OPTIONS = {
|
|
3376
3373
|
autoSpace: false,
|
|
3377
3374
|
gfmAutoLink: true,
|
|
@@ -7213,26 +7210,6 @@ var attachLineNumbersToBlocks = function (root, sourceMarkdown) {
|
|
|
7213
7210
|
tableGroups: tableGroups,
|
|
7214
7211
|
});
|
|
7215
7212
|
}
|
|
7216
|
-
console.log("[LineNumber][perf]", {
|
|
7217
|
-
cached: !!cached,
|
|
7218
|
-
times: {
|
|
7219
|
-
normalize: Math.round((tNorm - t0) * 100) / 100,
|
|
7220
|
-
index: Math.round((tIndexDone - tNorm) * 100) / 100,
|
|
7221
|
-
blocks: Math.round((tBlockDone - tIndexDone) * 100) / 100,
|
|
7222
|
-
ul: Math.round((tUlDone - tBlockDone) * 100) / 100,
|
|
7223
|
-
ol: Math.round((tOlDone - tUlDone) * 100) / 100,
|
|
7224
|
-
table: Math.round((tTableDone - tIndexDone) * 100) / 100,
|
|
7225
|
-
apply: Math.round((tApplyDone - tTableDone) * 100) / 100,
|
|
7226
|
-
total: Math.round((tApplyDone - t0) * 100) / 100,
|
|
7227
|
-
},
|
|
7228
|
-
counts: {
|
|
7229
|
-
blocks: blocks.length,
|
|
7230
|
-
ul: ulElements.length,
|
|
7231
|
-
ol: olElements.length,
|
|
7232
|
-
tables: tables.length,
|
|
7233
|
-
updates: attrUpdates.length,
|
|
7234
|
-
},
|
|
7235
|
-
});
|
|
7236
7213
|
};
|
|
7237
7214
|
/**
|
|
7238
7215
|
* 节流后的行号更新函数,避免频繁更新 data-linenumber
|