wikiparser-node 1.37.0 → 1.38.1
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/bundle/bundle-es8.min.js +23 -23
- package/bundle/bundle-lsp.min.js +30 -30
- package/bundle/bundle.min.js +15 -15
- package/config/moegirl.json +3 -0
- package/data/ext/math.json +4 -9
- package/data/ext/score.json +4 -375
- package/dist/addon/attribute.js +2 -2
- package/dist/addon/table.js +2 -2
- package/dist/base.d.mts +3 -2
- package/dist/base.d.ts +3 -2
- package/dist/base.js +1 -0
- package/dist/base.mjs +1 -0
- package/dist/bin/config.js +5 -4
- package/dist/index.js +4 -4
- package/dist/lib/lintConfig.js +6 -3
- package/dist/lib/lsp.d.ts +3 -1
- package/dist/lib/lsp.js +45 -28
- package/dist/lib/ranges.js +3 -0
- package/dist/lib/title.js +1 -0
- package/dist/render/magicWords.js +14 -10
- package/dist/render/syntaxhighlight.js +12 -8
- package/dist/src/index.js +3 -3
- package/dist/src/link/base.js +1 -0
- package/dist/src/link/file.js +12 -0
- package/dist/src/nowiki/index.js +1 -0
- package/dist/src/table/base.d.ts +5 -0
- package/dist/src/table/base.js +3 -10
- package/dist/src/table/index.d.ts +2 -2
- package/dist/src/table/td.js +8 -5
- package/dist/src/tagPair/translate.js +2 -2
- package/dist/src/transclude.js +1 -0
- package/dist/util/sharable.js +1 -1
- package/dist/util/sharable.mjs +2 -2
- package/dist/util/string.js +2 -1
- package/extensions/dist/base.js +1 -1
- package/extensions/dist/lsp.js +1 -1
- package/i18n/en.json +1 -0
- package/i18n/zh-hans.json +1 -0
- package/i18n/zh-hant.json +1 -0
- package/package.json +15 -14
package/dist/util/sharable.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const blockAttrs = /* @__PURE__ */ new Set(["align"]), citeAttrs = /* @__PURE__ */ new Set(["cite"]), citeAndAttrs = /* @__PURE__ */ new Set(["cite", "datetime"]), widthAttrs = /* @__PURE__ */ new Set(["width"]),
|
|
1
|
+
const blockAttrs = /* @__PURE__ */ new Set(["align"]), citeAttrs = /* @__PURE__ */ new Set(["cite"]), citeAndAttrs = /* @__PURE__ */ new Set(["cite", "datetime"]), widthAttrs = /* @__PURE__ */ new Set(["width"]), trAttrs = /* @__PURE__ */ new Set(["bgcolor", "align", "valign"]), obsoleteTdAttrs = /* @__PURE__ */ new Set([...trAttrs, "axis", "height", "nowrap", "width"]), tdAttrs = /* @__PURE__ */ new Set([...obsoleteTdAttrs, "abbr", "headers", "scope", "rowspan", "colspan"]), typeAttrs = /* @__PURE__ */ new Set(["type"]), obsoleteTableAttrs = /* @__PURE__ */ new Set(
|
|
2
2
|
["summary", "align", "bgcolor", "cellpadding", "cellspacing", "frame", "rules", "width"]
|
|
3
|
-
), brAttrs = /* @__PURE__ */ new Set(["clear"]),
|
|
3
|
+
), brAttrs = /* @__PURE__ */ new Set(["clear"]), chemAttrs = /* @__PURE__ */ new Set(["id", "qid", "forcemathmode", "type", "display"]), syntaxHighlightAttrs = /* @__PURE__ */ new Set([
|
|
4
4
|
"enclose",
|
|
5
5
|
"inline",
|
|
6
6
|
"lang",
|
package/dist/util/string.js
CHANGED
|
@@ -106,7 +106,8 @@ exports.print = print;
|
|
|
106
106
|
/* PRINT ONLY END */
|
|
107
107
|
/* NOT FOR BROWSER */
|
|
108
108
|
/** escape special chars for RegExp constructor */
|
|
109
|
-
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
110
|
+
exports.escapeRegExp = RegExp.escape || factory(/[\\{}()|.?*+^$[\]]/gu, String.raw `\$&`);
|
|
110
111
|
/** escape newlines */
|
|
111
112
|
exports.noWrap = factory(/\n/gu, String.raw `\n`);
|
|
112
113
|
/** encode URI */
|
package/extensions/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var _a;
|
|
3
|
-
const version = '1.
|
|
3
|
+
const version = '1.38.1', 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://fastly.jsdelivr.net/npm/wikiparser-node@${version}`;
|
|
6
6
|
const workerJS = () => {
|
package/extensions/dist/lsp.js
CHANGED
|
@@ -24,7 +24,7 @@ class LanguageService {
|
|
|
24
24
|
__classPrivateFieldSet(this, _LanguageService_id, wikiparse.id++, "f");
|
|
25
25
|
__classPrivateFieldSet(this, _LanguageService_include, include, "f");
|
|
26
26
|
}
|
|
27
|
-
destroy() {
|
|
27
|
+
async destroy() {
|
|
28
28
|
wikiparse.provide('destroy', __classPrivateFieldGet(this, _LanguageService_id, "f"));
|
|
29
29
|
}
|
|
30
30
|
provideColorPresentations(color) {
|
package/i18n/en.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"argument-in-ext": "template argument inside an extension tag",
|
|
3
3
|
"attributes-of-closing-tag": "attributes of a closing tag",
|
|
4
|
+
"blank-alt": "blank alt attribute",
|
|
4
5
|
"bold-apostrophes": "bold apostrophes",
|
|
5
6
|
"bold-in-header": "bold text in a section header",
|
|
6
7
|
"chem-required": "chem attribute required",
|
package/i18n/zh-hans.json
CHANGED
package/i18n/zh-hant.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiparser-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.1",
|
|
4
4
|
"description": "A Node.js parser for MediaWiki markup with AST",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"prof": "node dist/test/prof.js",
|
|
61
61
|
"coverage": "tsc --declaration false --target es2024 && npm run build:define && c8 npm run test:ci && node dist/script/coverage.js && open coverage/index.html",
|
|
62
62
|
"test:unit": "mocha dist/test/test.js",
|
|
63
|
+
"test:math": "mocha dist/test/math.js",
|
|
63
64
|
"test:clonenode": "CLONENODE=1 npm run test:unit",
|
|
64
65
|
"test:parser": "LC_ALL=en.UTF-8 mocha dist/test/parserTests.js",
|
|
65
66
|
"test:perf": "mocha --reporter spec dist/test/perf.js",
|
|
@@ -84,6 +85,7 @@
|
|
|
84
85
|
"dependencies": {
|
|
85
86
|
"@bhsd/cm-util": "^1.0.0",
|
|
86
87
|
"@bhsd/common": "^2.0.0",
|
|
88
|
+
"@bhsd/nodejs": "^1.0.0",
|
|
87
89
|
"@bhsd/stylelint-util": "^1.0.1",
|
|
88
90
|
"binary-search": "^1.3.6",
|
|
89
91
|
"vscode-languageserver-types": "^3.17.5"
|
|
@@ -94,42 +96,41 @@
|
|
|
94
96
|
"mathoid-texvcjs": "^0.6.0",
|
|
95
97
|
"prism-wiki": "^2.0.0",
|
|
96
98
|
"prismjs": "^1.30.0",
|
|
97
|
-
"stylelint": "^17.
|
|
99
|
+
"stylelint": "^17.6.0",
|
|
98
100
|
"vscode-css-languageservice": "^6.3.10",
|
|
99
101
|
"vscode-html-languageservice": "^5.6.2",
|
|
100
102
|
"vscode-json-languageservice": "^5.7.2"
|
|
101
103
|
},
|
|
102
104
|
"devDependencies": {
|
|
103
|
-
"@bhsd/code-standard": "^2.
|
|
104
|
-
"@bhsd/
|
|
105
|
-
"@bhsd/test-util": "^0.4.0",
|
|
105
|
+
"@bhsd/code-standard": "^2.2.0",
|
|
106
|
+
"@bhsd/test-util": "^1.0.0",
|
|
106
107
|
"@codemirror/lint": "^6.9.5",
|
|
107
|
-
"@eslint/markdown": "^
|
|
108
|
+
"@eslint/markdown": "^8.0.1",
|
|
109
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
|
|
108
110
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
109
111
|
"@types/color-name": "^2.0.0",
|
|
110
112
|
"@types/color-rgba": "^2.1.3",
|
|
111
113
|
"@types/mocha": "^10.0.10",
|
|
112
114
|
"@types/node": "^24.11.0",
|
|
113
115
|
"@types/prismjs": "^1.26.6",
|
|
114
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
115
|
-
"@typescript-eslint/parser": "^8.
|
|
116
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
117
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
116
118
|
"c8": "^11.0.0",
|
|
117
119
|
"codejar-async": "^4.3.0",
|
|
118
120
|
"color-rgba": "^3.0.0",
|
|
119
121
|
"diff2html-cli": "^5.2.15",
|
|
120
|
-
"esbuild": "^0.27.
|
|
121
|
-
"eslint": "^
|
|
122
|
-
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
122
|
+
"esbuild": "^0.27.7",
|
|
123
|
+
"eslint": "^10.2.0",
|
|
123
124
|
"eslint-plugin-jsdoc": "^62.7.1",
|
|
124
|
-
"eslint-plugin-jsonc": "^3.1.
|
|
125
|
+
"eslint-plugin-jsonc": "^3.1.2",
|
|
125
126
|
"eslint-plugin-n": "^17.24.0",
|
|
126
127
|
"eslint-plugin-promise": "^7.2.1",
|
|
127
128
|
"eslint-plugin-regexp": "^3.1.0",
|
|
128
|
-
"eslint-plugin-unicorn": "^
|
|
129
|
+
"eslint-plugin-unicorn": "^64.0.0",
|
|
129
130
|
"markdownlint-cli2": "^0.21.0",
|
|
130
131
|
"mocha": "^11.7.5",
|
|
131
132
|
"monaco-editor": "~0.53.0",
|
|
132
|
-
"typescript": "^
|
|
133
|
+
"typescript": "^6.0.2",
|
|
133
134
|
"v8r": "^6.0.0",
|
|
134
135
|
"vscode-languageserver-textdocument": "^1.0.12"
|
|
135
136
|
},
|