@bhsd/codemirror-mediawiki 2.20.0 → 2.20.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/dist/mw.min.js +16 -16
- package/dist/mwConfig.mjs +6 -1
- package/dist/wiki.min.js +16 -16
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/mw/config.ts +6 -4
- package/package.json +2 -2
package/i18n/en.json
CHANGED
package/i18n/zh-hans.json
CHANGED
package/i18n/zh-hant.json
CHANGED
package/mw/config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {CDN, setObject, getObject} from '@bhsd/common';
|
|
1
|
+
import {CDN, setObject, getObject, compareVersion} from '@bhsd/common';
|
|
2
2
|
import {getStaticMwConfig} from '../src/static';
|
|
3
3
|
import type {Config} from 'wikiparser-node';
|
|
4
4
|
import type {MwConfig} from '../src/token';
|
|
@@ -173,9 +173,11 @@ export const getParserConfig = (minConfig: Config, mwConfig: MwConfig): Config =
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
config.parserFunction[1] =
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
config.parserFunction[1] = 'wikiparser' in globalThis
|
|
177
|
+
&& compareVersion(wikiparse.version, '1.15')
|
|
178
|
+
&& !Object.values(sensitive as Record<string, unknown>).includes(true)
|
|
179
|
+
? {...sensitive, '=': '='}
|
|
180
|
+
: [...Object.keys(sensitive), '='];
|
|
179
181
|
for (const [key, val] of Object.entries(img!)) {
|
|
180
182
|
config.img[key] = val.slice(4);
|
|
181
183
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bhsd/codemirror-mediawiki",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.1",
|
|
4
4
|
"description": "Modified CodeMirror mode based on wikimedia/mediawiki-extensions-CodeMirror",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"test:real": "node test/dist/test/real.js"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@bhsd/common": "^0.
|
|
52
|
+
"@bhsd/common": "^0.6.0",
|
|
53
53
|
"@codemirror/language": "^6.10.6",
|
|
54
54
|
"@codemirror/lint": "^6.8.4",
|
|
55
55
|
"@codemirror/state": "^6.4.1",
|