wikiparser-node 1.21.2 → 1.22.0
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/README.md +9 -5
- package/bundle/bundle-es8.min.js +25 -25
- package/bundle/bundle-lsp.min.js +26 -26
- package/bundle/bundle.min.js +25 -25
- package/config/default.json +15 -11
- package/config/enwiki.json +1 -1
- package/config/jawiki.json +1 -1
- package/config/minimum.json +2 -3
- package/config/moegirl.json +152 -15
- package/config/zhwiki.json +1 -1
- package/dist/addon/token.js +3 -0
- package/dist/base.d.mts +16 -9
- package/dist/base.d.ts +16 -9
- package/dist/bin/config.js +23 -11
- package/dist/index.d.ts +33 -4
- package/dist/index.js +37 -2
- package/dist/lib/element.d.ts +4 -4
- package/dist/lib/element.js +6 -5
- package/dist/lib/lintConfig.d.ts +13 -0
- package/dist/lib/lintConfig.js +278 -0
- package/dist/lib/lsp.d.ts +7 -7
- package/dist/lib/lsp.js +18 -20
- package/dist/lib/node.d.ts +1 -1
- package/dist/lib/node.js +646 -606
- package/dist/lib/range.d.ts +2 -2
- package/dist/lib/range.js +2 -2
- package/dist/lib/text.js +76 -62
- package/dist/lib/title.d.ts +11 -4
- package/dist/lib/title.js +16 -6
- package/dist/mixin/attributesParent.d.ts +6 -6
- package/dist/mixin/attributesParent.js +4 -4
- package/dist/mixin/cached.d.ts +5 -0
- package/dist/mixin/cached.js +22 -0
- package/dist/mixin/clone.d.ts +5 -0
- package/dist/mixin/clone.js +23 -0
- package/dist/mixin/hidden.js +68 -18
- package/dist/mixin/sol.js +1 -1
- package/dist/parser/commentAndExt.js +6 -4
- package/dist/parser/converter.js +1 -1
- package/dist/parser/html.js +3 -3
- package/dist/parser/table.js +2 -2
- package/dist/src/arg.js +24 -17
- package/dist/src/atom.js +76 -31
- package/dist/src/attribute.js +79 -39
- package/dist/src/attributes.d.ts +7 -7
- package/dist/src/attributes.js +417 -366
- package/dist/src/commented.js +81 -35
- package/dist/src/converter.js +13 -7
- package/dist/src/converterFlags.js +33 -22
- package/dist/src/converterRule.js +263 -216
- package/dist/src/extLink.js +21 -16
- package/dist/src/gallery.js +44 -27
- package/dist/src/heading.js +48 -43
- package/dist/src/hidden.js +14 -9
- package/dist/src/html.js +92 -60
- package/dist/src/imageParameter.js +13 -6
- package/dist/src/imagemap.js +32 -25
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +61 -50
- package/dist/src/link/base.d.ts +1 -1
- package/dist/src/link/base.js +35 -23
- package/dist/src/link/file.js +409 -354
- package/dist/src/link/galleryImage.js +9 -5
- package/dist/src/link/index.d.ts +1 -1
- package/dist/src/link/index.js +8 -4
- package/dist/src/link/redirectTarget.js +7 -3
- package/dist/src/magicLink.js +39 -26
- package/dist/src/nested.js +122 -74
- package/dist/src/nowiki/base.js +5 -2
- package/dist/src/nowiki/comment.js +5 -1
- package/dist/src/nowiki/index.js +4 -4
- package/dist/src/nowiki/quote.js +32 -46
- package/dist/src/onlyinclude.js +17 -9
- package/dist/src/paramTag/index.js +21 -14
- package/dist/src/parameter.js +26 -20
- package/dist/src/pre.js +91 -45
- package/dist/src/syntax.js +14 -10
- package/dist/src/table/index.js +554 -501
- package/dist/src/table/td.d.ts +1 -1
- package/dist/src/table/td.js +91 -82
- package/dist/src/table/trBase.js +183 -130
- package/dist/src/tagPair/ext.js +38 -23
- package/dist/src/tagPair/include.js +5 -5
- package/dist/src/tagPair/index.js +2 -3
- package/dist/src/tagPair/translate.js +150 -103
- package/dist/src/transclude.d.ts +15 -1
- package/dist/src/transclude.js +56 -21
- package/dist/util/html.js +46 -41
- package/dist/util/lint.js +7 -9
- package/dist/util/sharable.js +1 -1
- package/dist/util/sharable.mjs +2 -2
- package/dist/util/string.js +13 -7
- package/extensions/dist/base.js +9 -2
- package/extensions/typings.d.ts +2 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +20 -15
package/dist/util/html.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* NOT FOR BROWSER */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const
|
|
4
|
+
exports.getId = exports.html = exports.getCommon = void 0;
|
|
5
|
+
const string_1 = require("./string");
|
|
6
6
|
/* NOT FOR BROWSER END */
|
|
7
7
|
/**
|
|
8
8
|
* get common prefix length
|
|
@@ -90,38 +90,48 @@ const html = (childNodes, separator = '', opt) => {
|
|
|
90
90
|
const child = childNodes[j];
|
|
91
91
|
let result = child.toHtmlInternal(opt);
|
|
92
92
|
if (child.is('list-range')) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
const { previousSibling } = child, { innerText } = previousSibling;
|
|
94
|
+
if ((child.length > 0 || /\s$/u.test(innerText))
|
|
95
|
+
&& previousSibling.is('list')
|
|
96
|
+
&& !/[;#*]/u.test(innerText)
|
|
97
|
+
&& child.closest('ext#poem,list-range')?.is('ext')) {
|
|
98
|
+
lastPrefix = '';
|
|
99
|
+
result = `<span style="display: inline-block; margin-inline-start: ${previousSibling.indent}em;">${result}</span>`;
|
|
98
100
|
}
|
|
99
101
|
else {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
result = result.trim();
|
|
103
|
+
const prefix = innerText.trim(), prefix2 = prefix.replaceAll(';', ':'), commonPrefixLength = (0, exports.getCommon)(prefix2, lastPrefix);
|
|
104
|
+
let pre = closeList(lastPrefix.slice(commonPrefixLength), state);
|
|
105
|
+
if (prefix.length === commonPrefixLength) {
|
|
106
|
+
pre += nextItem(prefix.slice(-1), state);
|
|
102
107
|
}
|
|
103
|
-
|
|
104
|
-
|
|
108
|
+
else {
|
|
109
|
+
if (state.dt[0] && prefix[commonPrefixLength - 1] === ':') {
|
|
110
|
+
pre += nextItem(':', state);
|
|
111
|
+
}
|
|
112
|
+
if (lastPrefix) {
|
|
113
|
+
pre += '\n';
|
|
114
|
+
}
|
|
115
|
+
pre += openList(prefix.slice(commonPrefixLength), state);
|
|
116
|
+
}
|
|
117
|
+
result = pre + result;
|
|
118
|
+
let { nextSibling } = child;
|
|
119
|
+
while (nextSibling?.is('dd')) {
|
|
120
|
+
const next = nextSibling.nextSibling;
|
|
121
|
+
result += nextItem(':', state) + next.toHtmlInternal(opt).trim();
|
|
122
|
+
({ nextSibling } = next);
|
|
123
|
+
j += 2;
|
|
124
|
+
}
|
|
125
|
+
if (nextSibling?.type === 'text'
|
|
126
|
+
&& nextSibling.data === '\n'
|
|
127
|
+
&& nextSibling.nextVisibleSibling?.is('list')) {
|
|
128
|
+
j += 2;
|
|
129
|
+
lastPrefix = prefix2;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
lastPrefix = '';
|
|
133
|
+
result += closeList(prefix2, state);
|
|
105
134
|
}
|
|
106
|
-
pre += openList(prefix.slice(commonPrefixLength), state);
|
|
107
|
-
}
|
|
108
|
-
result = pre + result;
|
|
109
|
-
let { nextSibling } = child;
|
|
110
|
-
while (nextSibling?.is('dd')) {
|
|
111
|
-
const next = nextSibling.nextSibling;
|
|
112
|
-
result += nextItem(':', state) + next.toHtmlInternal(opt).trim();
|
|
113
|
-
({ nextSibling } = next);
|
|
114
|
-
j += 2;
|
|
115
|
-
}
|
|
116
|
-
if (nextSibling?.type === 'text'
|
|
117
|
-
&& nextSibling.data === '\n'
|
|
118
|
-
&& nextSibling.nextVisibleSibling?.is('list')) {
|
|
119
|
-
j += 2;
|
|
120
|
-
lastPrefix = prefix2;
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
lastPrefix = '';
|
|
124
|
-
result += closeList(prefix2, state);
|
|
125
135
|
}
|
|
126
136
|
}
|
|
127
137
|
results.push(result);
|
|
@@ -130,16 +140,11 @@ const html = (childNodes, separator = '', opt) => {
|
|
|
130
140
|
};
|
|
131
141
|
exports.html = html;
|
|
132
142
|
/**
|
|
133
|
-
*
|
|
134
|
-
* @param
|
|
135
|
-
* @param f empty token constructor
|
|
143
|
+
* get the id of a section heading
|
|
144
|
+
* @param tokens inner tokens of a section heading
|
|
136
145
|
*/
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
return
|
|
140
|
-
const newToken = f();
|
|
141
|
-
newToken.safeAppend(cloned);
|
|
142
|
-
return newToken;
|
|
143
|
-
});
|
|
146
|
+
const getId = (tokens) => {
|
|
147
|
+
const opt = { nocc: true }, content = Array.isArray(tokens) ? (0, exports.html)(tokens, '', opt) : tokens.toHtmlInternal(opt), id = (0, string_1.decodeHtml)((0, string_1.sanitizeAlt)(content)).replace(/[\s_]+/gu, '_');
|
|
148
|
+
return id.endsWith('_') ? id.slice(0, -1) : id;
|
|
144
149
|
};
|
|
145
|
-
exports.
|
|
150
|
+
exports.getId = getId;
|
package/dist/util/lint.js
CHANGED
|
@@ -27,16 +27,14 @@ const isFostered = (token) => {
|
|
|
27
27
|
else if (first.is('magic-word')) {
|
|
28
28
|
try {
|
|
29
29
|
const severity = first.getPossibleValues().map(exports.isFostered);
|
|
30
|
-
return severity.includes(
|
|
31
|
-
? 'error'
|
|
32
|
-
: severity.includes('warning') && 'warning';
|
|
30
|
+
return severity.includes(2) ? 2 : severity.includes(1) && 1;
|
|
33
31
|
}
|
|
34
32
|
catch { }
|
|
35
33
|
}
|
|
36
34
|
return first.is('template')
|
|
37
35
|
|| first.is('magic-word') && first.name === 'invoke'
|
|
38
|
-
?
|
|
39
|
-
:
|
|
36
|
+
? 1
|
|
37
|
+
: 2;
|
|
40
38
|
};
|
|
41
39
|
exports.isFostered = isFostered;
|
|
42
40
|
/**
|
|
@@ -83,16 +81,16 @@ exports.generateForSelf = factory((_, startIndex, startLine, startCol) => ({ sta
|
|
|
83
81
|
* @param store 缓存的值
|
|
84
82
|
* @param compute 计算新值的函数
|
|
85
83
|
* @param update 更新缓存的函数
|
|
84
|
+
* @param force 是否强制缓存
|
|
86
85
|
*/
|
|
87
|
-
const cache = (store, compute, update) => {
|
|
86
|
+
const cache = (store, compute, update, force) => {
|
|
88
87
|
if (store
|
|
89
88
|
/* PRINT ONLY */
|
|
90
|
-
&& index_1.default.viewOnly
|
|
91
|
-
&& store[0] === debug_1.Shadow.rev) {
|
|
89
|
+
&& (force || index_1.default.viewOnly && store[0] === debug_1.Shadow.rev)) {
|
|
92
90
|
return store[1];
|
|
93
91
|
}
|
|
94
92
|
const result = compute();
|
|
95
|
-
if (index_1.default.viewOnly) {
|
|
93
|
+
if (force || index_1.default.viewOnly) {
|
|
96
94
|
update([debug_1.Shadow.rev, result]);
|
|
97
95
|
}
|
|
98
96
|
return result;
|
package/dist/util/sharable.js
CHANGED
|
@@ -65,7 +65,6 @@ exports.commonHtmlAttrs = new Set([
|
|
|
65
65
|
tr: trAttrs,
|
|
66
66
|
td: tdAttrs,
|
|
67
67
|
th: tdAttrs,
|
|
68
|
-
img: new Set(['alt', 'src', 'width', 'height', 'srcset']),
|
|
69
68
|
font: new Set(['size', 'color', 'face']),
|
|
70
69
|
hr: widthAttrs,
|
|
71
70
|
data: new Set(['value']),
|
|
@@ -79,6 +78,7 @@ exports.commonHtmlAttrs = new Set([
|
|
|
79
78
|
math: empty,
|
|
80
79
|
chem: empty,
|
|
81
80
|
ce: empty,
|
|
81
|
+
img: new Set(['alt', 'src', 'width', 'height', 'loading']),
|
|
82
82
|
}))(), exports.extAttrs = (() => ({
|
|
83
83
|
gallery: new Set(['mode', 'showfilename', 'caption', 'perrow', 'widths', 'heights', 'showthumbnails']),
|
|
84
84
|
poem: new Set(['compact']),
|
package/dist/util/sharable.mjs
CHANGED
|
@@ -63,7 +63,6 @@ const commonHtmlAttrs = /* @__PURE__ */ new Set([
|
|
|
63
63
|
tr: trAttrs,
|
|
64
64
|
td: tdAttrs,
|
|
65
65
|
th: tdAttrs,
|
|
66
|
-
img: /* @__PURE__ */ new Set(["alt", "src", "width", "height", "srcset"]),
|
|
67
66
|
font: /* @__PURE__ */ new Set(["size", "color", "face"]),
|
|
68
67
|
hr: widthAttrs,
|
|
69
68
|
data: /* @__PURE__ */ new Set(["value"]),
|
|
@@ -76,7 +75,8 @@ const commonHtmlAttrs = /* @__PURE__ */ new Set([
|
|
|
76
75
|
combooption: blockAttrs,
|
|
77
76
|
math: empty,
|
|
78
77
|
chem: empty,
|
|
79
|
-
ce: empty
|
|
78
|
+
ce: empty,
|
|
79
|
+
img: /* @__PURE__ */ new Set(["alt", "src", "width", "height", "loading"])
|
|
80
80
|
}))(), extAttrs = /* @__PURE__ */ (() => ({
|
|
81
81
|
gallery: /* @__PURE__ */ new Set(["mode", "showfilename", "caption", "perrow", "widths", "heights", "showthumbnails"]),
|
|
82
82
|
poem: /* @__PURE__ */ new Set(["compact"]),
|
package/dist/util/string.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeCommentLine = exports.newline = exports.sanitizeAlt = exports.sanitizeId = exports.sanitizeAttr = exports.sanitize = exports.normalizeSpace = exports.encode = exports.
|
|
3
|
+
exports.removeCommentLine = exports.newline = exports.sanitizeAlt = exports.sanitizeId = exports.sanitizeAttr = exports.sanitize = exports.normalizeSpace = exports.encode = exports.noWrap = exports.escapeRegExp = exports.print = exports.escape = exports.decodeNumber = exports.decodeHtml = exports.decodeHtmlBasic = exports.text = exports.removeComment = exports.tidy = exports.restore = exports.trimLc = exports.extUrlChar = exports.extUrlCharFirst = exports.zs = exports.rawurldecode = void 0;
|
|
4
4
|
var common_1 = require("@bhsd/common");
|
|
5
5
|
Object.defineProperty(exports, "rawurldecode", { enumerable: true, get: function () { return common_1.rawurldecode; } });
|
|
6
6
|
exports.zs = String.raw ` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`;
|
|
@@ -30,8 +30,6 @@ const factory = (regex, replace) => (str) => str.replace(regex, replace);
|
|
|
30
30
|
exports.tidy = factory(/[\0\x7F]|\r$/gmu, '');
|
|
31
31
|
/** remove half-parsed comment-like tokens */
|
|
32
32
|
exports.removeComment = factory(/\0\d+[cn]\x7F/gu, '');
|
|
33
|
-
/** escape special chars for RegExp constructor */
|
|
34
|
-
exports.escapeRegExp = factory(/[\\{}()|.?*+^$[\]]/gu, String.raw `\$&`);
|
|
35
33
|
/**
|
|
36
34
|
* extract effective wikitext
|
|
37
35
|
* @param childNodes a Token's contents
|
|
@@ -65,8 +63,6 @@ const decodeHtml = (str) => {
|
|
|
65
63
|
exports.decodeHtml = decodeHtml;
|
|
66
64
|
/** decode numbered HTML entities */
|
|
67
65
|
exports.decodeNumber = factory(/&#(\d+|x[\da-f]+);/giu, (_, code) => String.fromCodePoint(Number((/^x/iu.test(code) ? '0' : '') + code)));
|
|
68
|
-
/** escape newlines */
|
|
69
|
-
exports.noWrap = factory(/\n/gu, String.raw `\n`);
|
|
70
66
|
/* PRINT ONLY */
|
|
71
67
|
const entities = { '&': 'amp', '<': 'lt', '>': 'gt', '"': 'quot', '\n': '#10' };
|
|
72
68
|
/**
|
|
@@ -88,6 +84,10 @@ const print = (childNodes, opt = {}) => {
|
|
|
88
84
|
exports.print = print;
|
|
89
85
|
/* PRINT ONLY END */
|
|
90
86
|
/* NOT FOR BROWSER */
|
|
87
|
+
/** escape special chars for RegExp constructor */
|
|
88
|
+
exports.escapeRegExp = factory(/[\\{}()|.?*+^$[\]]/gu, String.raw `\$&`);
|
|
89
|
+
/** escape newlines */
|
|
90
|
+
exports.noWrap = factory(/\n/gu, String.raw `\n`);
|
|
91
91
|
/** encode URI */
|
|
92
92
|
exports.encode = factory(/[<>[\]#|=]+/gu, encodeURIComponent);
|
|
93
93
|
/**
|
|
@@ -106,8 +106,14 @@ const normalizeSpace = (token) => {
|
|
|
106
106
|
exports.normalizeSpace = normalizeSpace;
|
|
107
107
|
/** escape HTML entities */
|
|
108
108
|
exports.sanitize = replaceEntities(/[<>]|&(?=amp(?!;))/giu);
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
const replaceAttrEntities = replaceEntities(/[<>"]/gu);
|
|
110
|
+
/**
|
|
111
|
+
* escape HTML entities in attributes
|
|
112
|
+
* @param attr 属性值
|
|
113
|
+
* @param id 是否是`id`属性
|
|
114
|
+
*/
|
|
115
|
+
const sanitizeAttr = (attr, id) => replaceAttrEntities(attr.replace(/\s+| /gu, id ? '_' : ' '));
|
|
116
|
+
exports.sanitizeAttr = sanitizeAttr;
|
|
111
117
|
/** escape HTML entities in heading id */
|
|
112
118
|
exports.sanitizeId = replaceEntities(/["&]/gu);
|
|
113
119
|
/**
|
package/extensions/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var _a;
|
|
3
|
-
const version = '1.
|
|
3
|
+
const version = '1.22.0', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
|
|
4
4
|
? src.replace(file, '')
|
|
5
5
|
: `https://testingcf.jsdelivr.net/npm/wikiparser-node@${version}`;
|
|
6
6
|
const workerJS = () => {
|
|
@@ -22,7 +22,7 @@ const workerJS = () => {
|
|
|
22
22
|
if (lsps.has(id)) {
|
|
23
23
|
return lsps.get(id);
|
|
24
24
|
}
|
|
25
|
-
const lsp = Parser.createLanguageService(
|
|
25
|
+
const lsp = Parser.createLanguageService();
|
|
26
26
|
lsp.include = include;
|
|
27
27
|
lsps.set(id, lsp);
|
|
28
28
|
return lsp;
|
|
@@ -55,6 +55,9 @@ const workerJS = () => {
|
|
|
55
55
|
case 'setI18N':
|
|
56
56
|
Parser.i18n = qid;
|
|
57
57
|
break;
|
|
58
|
+
case 'setLintConfig':
|
|
59
|
+
Parser.lintConfig = qid;
|
|
60
|
+
break;
|
|
58
61
|
case 'setConfig':
|
|
59
62
|
Parser.config = qid;
|
|
60
63
|
delete last.wikitext;
|
|
@@ -210,6 +213,9 @@ const getListener = (command, qid, resolve, raw) => {
|
|
|
210
213
|
const setI18N = (i18n) => {
|
|
211
214
|
worker.postMessage(['setI18N', i18n]);
|
|
212
215
|
};
|
|
216
|
+
const setLintConfig = (config) => {
|
|
217
|
+
worker.postMessage(['setLintConfig', config]);
|
|
218
|
+
};
|
|
213
219
|
const setConfig = (config) => {
|
|
214
220
|
worker.postMessage(['setConfig', config]);
|
|
215
221
|
wikiparse.config = config;
|
|
@@ -334,6 +340,7 @@ const wikiparse = {
|
|
|
334
340
|
id: 0,
|
|
335
341
|
config: {},
|
|
336
342
|
setI18N,
|
|
343
|
+
setLintConfig,
|
|
337
344
|
setConfig,
|
|
338
345
|
getConfig,
|
|
339
346
|
print,
|
package/extensions/typings.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
ColorPresentation,
|
|
9
9
|
} from 'vscode-languageserver-types';
|
|
10
10
|
// 必须写在一行内
|
|
11
|
-
import type {Config, ConfigData, LintError, AST, LanguageService} from '../base';
|
|
11
|
+
import type {Config, ConfigData, LintConfig, LintError, AST, LanguageService} from '../base';
|
|
12
12
|
|
|
13
13
|
export type Diagnostic = DiagnosticBase & {rule: LintError.Rule};
|
|
14
14
|
|
|
@@ -44,6 +44,7 @@ export interface wikiparse {
|
|
|
44
44
|
version: string;
|
|
45
45
|
CDN: string;
|
|
46
46
|
setI18N: (i18n?: Record<string, string>) => void;
|
|
47
|
+
setLintConfig: (config?: LintConfig) => void;
|
|
47
48
|
setConfig: (config: ConfigData) => void;
|
|
48
49
|
getConfig: () => Promise<Config>;
|
|
49
50
|
json: (wikitext: string, include: boolean, qid?: number, stage?: number) => Promise<AST>;
|
package/i18n/zh-hans.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"bold in section header": "段落标题中的粗体",
|
|
9
9
|
"conflicting image $1 parameter": "冲突的图片$1参数",
|
|
10
10
|
"containing invalid attribute": "包含无效属性",
|
|
11
|
-
"content to be moved
|
|
11
|
+
"content to be moved outside the table": "将被移出表格的内容",
|
|
12
12
|
"duplicated $1 attribute": "重复的$1属性",
|
|
13
13
|
"duplicated category": "重复的分类",
|
|
14
14
|
"duplicated id": "重复的id",
|
package/i18n/zh-hant.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"bold in section header": "段落標題中的粗體",
|
|
9
9
|
"conflicting image $1 parameter": "衝突的圖片$1參數",
|
|
10
10
|
"containing invalid attribute": "包含無效屬性",
|
|
11
|
-
"content to be moved
|
|
11
|
+
"content to be moved outside the table": "將被移出表格的內容",
|
|
12
12
|
"duplicated $1 attribute": "重複的$1屬性",
|
|
13
13
|
"duplicated category": "重複的分類",
|
|
14
14
|
"duplicated id": "重複的id",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiparser-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "A Node.js parser for MediaWiki markup with AST",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"/errors/README",
|
|
25
25
|
"/config/",
|
|
26
26
|
"!/config/mediawikiwiki.json",
|
|
27
|
+
"!/config/testwiki.json",
|
|
27
28
|
"/data/",
|
|
28
29
|
"/i18n/",
|
|
29
30
|
"/coverage/badge.svg",
|
|
@@ -76,7 +77,9 @@
|
|
|
76
77
|
]
|
|
77
78
|
},
|
|
78
79
|
"dependencies": {
|
|
79
|
-
"@bhsd/
|
|
80
|
+
"@bhsd/cm-util": "^0.0.0",
|
|
81
|
+
"@bhsd/common": "^1.0.0",
|
|
82
|
+
"@bhsd/stylelint-util": "^0.0.0",
|
|
80
83
|
"vscode-languageserver-types": "^3.17.5"
|
|
81
84
|
},
|
|
82
85
|
"optionalDependencies": {
|
|
@@ -84,33 +87,35 @@
|
|
|
84
87
|
"color-name": "^2.0.0",
|
|
85
88
|
"entities": "^6.0.0",
|
|
86
89
|
"mathjax": "^3.2.2",
|
|
87
|
-
"stylelint": "^16.
|
|
88
|
-
"vscode-css-languageservice": "^6.3.
|
|
89
|
-
"vscode-html-languageservice": "^5.
|
|
90
|
-
"vscode-json-languageservice": "^5.
|
|
90
|
+
"stylelint": "^16.21.1",
|
|
91
|
+
"vscode-css-languageservice": "^6.3.7",
|
|
92
|
+
"vscode-html-languageservice": "^5.5.1",
|
|
93
|
+
"vscode-json-languageservice": "^5.6.1"
|
|
91
94
|
},
|
|
92
95
|
"devDependencies": {
|
|
96
|
+
"@bhsd/code-standard": "^1.0.0",
|
|
97
|
+
"@bhsd/test-util": "^0.0.0",
|
|
93
98
|
"@codemirror/lint": "^6.8.5",
|
|
94
99
|
"@stylistic/eslint-plugin": "^3.1.0",
|
|
95
100
|
"@types/color-name": "^2.0.0",
|
|
96
101
|
"@types/color-rgba": "^2.1.3",
|
|
97
102
|
"@types/mocha": "^10.0.10",
|
|
98
|
-
"@types/node": "^
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
100
|
-
"@typescript-eslint/parser": "^8.
|
|
103
|
+
"@types/node": "^24.0.10",
|
|
104
|
+
"@typescript-eslint/eslint-plugin": "^8.35.1",
|
|
105
|
+
"@typescript-eslint/parser": "^8.35.1",
|
|
101
106
|
"codejar-async": "^4.2.7",
|
|
102
107
|
"color-rgba": "^3.0.0",
|
|
103
|
-
"esbuild": "^0.25.
|
|
108
|
+
"esbuild": "^0.25.5",
|
|
104
109
|
"eslint": "^8.57.1",
|
|
105
110
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
106
|
-
"eslint-plugin-jsdoc": "^
|
|
111
|
+
"eslint-plugin-jsdoc": "^51.3.3",
|
|
107
112
|
"eslint-plugin-json-es": "^1.6.0",
|
|
108
|
-
"eslint-plugin-markdown": "
|
|
109
|
-
"eslint-plugin-n": "^17.
|
|
113
|
+
"eslint-plugin-markdown": "5.1.0",
|
|
114
|
+
"eslint-plugin-n": "^17.20.0",
|
|
110
115
|
"eslint-plugin-promise": "^7.2.1",
|
|
111
|
-
"eslint-plugin-regexp": "^2.
|
|
116
|
+
"eslint-plugin-regexp": "^2.9.0",
|
|
112
117
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
113
|
-
"mocha": "^11.1
|
|
118
|
+
"mocha": "^11.7.1",
|
|
114
119
|
"monaco-editor": "^0.52.2",
|
|
115
120
|
"nyc": "^17.1.0",
|
|
116
121
|
"typescript": "^5.8.2",
|