wikiparser-node 1.5.2 → 1.5.3
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/src/link/base.js +2 -2
- package/dist/src/link/file.js +1 -1
- package/package.json +7 -5
package/dist/src/link/base.js
CHANGED
|
@@ -173,8 +173,8 @@ class LinkBaseToken extends index_2.Token {
|
|
|
173
173
|
return errors;
|
|
174
174
|
}
|
|
175
175
|
/** @private */
|
|
176
|
-
getTitle() {
|
|
177
|
-
return this.normalizeTitle(this.firstChild.text(), 0,
|
|
176
|
+
getTitle(halfParsed = false) {
|
|
177
|
+
return this.normalizeTitle(this.firstChild.text(), 0, halfParsed, true, true);
|
|
178
178
|
}
|
|
179
179
|
/** @override */
|
|
180
180
|
print() {
|
package/dist/src/link/file.js
CHANGED
|
@@ -99,7 +99,7 @@ class FileToken extends base_1.LinkBaseToken {
|
|
|
99
99
|
/* NOT FOR BROWSER */
|
|
100
100
|
this.setAttribute('acceptable', { AtomToken: 0, ImageParameterToken: '1:' });
|
|
101
101
|
/* NOT FOR BROWSER END */
|
|
102
|
-
const { extension } = this;
|
|
102
|
+
const { extension } = this.getTitle(true);
|
|
103
103
|
this.append(...explode('-{', '}-', '|', text).map(
|
|
104
104
|
// @ts-expect-error abstract class
|
|
105
105
|
part => new imageParameter_1.ImageParameterToken(part, extension, config, accum)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiparser-node",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "A Node.js parser for MediaWiki markup with AST",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -40,15 +40,17 @@
|
|
|
40
40
|
"test:end": "pkill -x http-server",
|
|
41
41
|
"test:real": "node dist/test/real.js"
|
|
42
42
|
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"chalk": "^4.1.2"
|
|
45
|
+
},
|
|
43
46
|
"devDependencies": {
|
|
44
47
|
"@cypress/request": "^3.0.1",
|
|
45
48
|
"@stylistic/eslint-plugin": "^1.5.4",
|
|
46
49
|
"@types/node": "^20.11.6",
|
|
47
50
|
"@types/request": "^2.48.12",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
49
|
-
"@typescript-eslint/parser": "^
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
52
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
50
53
|
"ajv-cli": "^5.0.0",
|
|
51
|
-
"chalk": "^4.1.2",
|
|
52
54
|
"eslint": "^8.56.0",
|
|
53
55
|
"eslint-plugin-es-x": "^7.5.0",
|
|
54
56
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
"eslint-plugin-n": "^16.6.2",
|
|
58
60
|
"eslint-plugin-promise": "^6.1.1",
|
|
59
61
|
"eslint-plugin-regexp": "^2.2.0",
|
|
60
|
-
"eslint-plugin-unicorn": "^
|
|
62
|
+
"eslint-plugin-unicorn": "^51.0.1",
|
|
61
63
|
"typescript": "^5.3.3"
|
|
62
64
|
},
|
|
63
65
|
"engines": {
|