@bhsd/codemirror-mediawiki 3.4.1 → 3.5.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 +0 -1
- package/dist/codemirror.d.ts +2 -2
- package/dist/codemirror.js +6 -5
- package/dist/html.js +3 -3
- package/dist/lintsource.d.ts +2 -0
- package/dist/main.min.js +25 -25
- package/dist/mediawiki.d.ts +1 -0
- package/dist/mediawiki.js +7 -7
- package/dist/mw.min.js +27 -27
- package/dist/static.d.ts +2 -0
- package/dist/static.js +2 -0
- package/dist/statusBar.js +12 -7
- package/dist/token.js +12 -3
- package/dist/wiki.min.js +26 -26
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +14 -13
package/dist/static.d.ts
CHANGED
package/dist/static.js
CHANGED
package/dist/statusBar.js
CHANGED
|
@@ -166,8 +166,14 @@ export default (cm, fixer) => [
|
|
|
166
166
|
display: 'table-cell',
|
|
167
167
|
},
|
|
168
168
|
[workerSelector]: {
|
|
169
|
-
|
|
169
|
+
WebkitUserSelect: 'none',
|
|
170
170
|
userSelect: 'none',
|
|
171
|
+
'--fix-icon': "url('data:image/svg+xml,"
|
|
172
|
+
+ '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">'
|
|
173
|
+
// eslint-disable-next-line @stylistic/max-len
|
|
174
|
+
+ '<path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7"/>'
|
|
175
|
+
+ '</svg>'
|
|
176
|
+
+ "')",
|
|
171
177
|
},
|
|
172
178
|
[`${workerSelector}>*`]: {
|
|
173
179
|
display: 'table-cell',
|
|
@@ -189,14 +195,13 @@ export default (cm, fixer) => [
|
|
|
189
195
|
height: '1em',
|
|
190
196
|
},
|
|
191
197
|
[`${disabledSelector},${enabledSelector}`]: {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
+ '<path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7"/>'
|
|
196
|
-
+ '</svg>'
|
|
197
|
-
+ "')",
|
|
198
|
+
WebkitMaskImage: 'var(--fix-icon)',
|
|
199
|
+
maskImage: 'var(--fix-icon)',
|
|
200
|
+
WebkitMaskSize: '100%',
|
|
198
201
|
maskSize: '100%',
|
|
202
|
+
WebkitMaskRepeat: 'no-repeat',
|
|
199
203
|
maskRepeat: 'no-repeat',
|
|
204
|
+
WebkitMaskPosition: 'center',
|
|
200
205
|
maskPosition: 'center',
|
|
201
206
|
},
|
|
202
207
|
[disabledSelector]: {
|
package/dist/token.js
CHANGED
|
@@ -906,7 +906,7 @@ let MediaWiki = (() => {
|
|
|
906
906
|
else if (stream.match(re) || space) {
|
|
907
907
|
return makeStyle(style, state);
|
|
908
908
|
}
|
|
909
|
-
else if (stream.match(/^<(?!(?:includeonly|noinclude)(?:\/?>|\s|$))[/a-z]/iu, false)
|
|
909
|
+
else if (stream.match(/^<(?!(?:includeonly|noinclude)(?:\/?>|\s|$)|tvar(?:\s|$))[/a-z]/iu, false)
|
|
910
910
|
&& !stream.match(/^<onlyinclude>/u, false)) {
|
|
911
911
|
lt = stream.pos + 1;
|
|
912
912
|
}
|
|
@@ -1259,6 +1259,10 @@ let MediaWiki = (() => {
|
|
|
1259
1259
|
};
|
|
1260
1260
|
return (stream, state) => {
|
|
1261
1261
|
if (stream.match('/>')) {
|
|
1262
|
+
if (name === 'tvar') {
|
|
1263
|
+
stream.backUp(1);
|
|
1264
|
+
return makeLocalTagStyle('error', state);
|
|
1265
|
+
}
|
|
1262
1266
|
state.extMode = false;
|
|
1263
1267
|
pop(state);
|
|
1264
1268
|
return makeLocalTagStyle('extTagBracket', state);
|
|
@@ -1267,7 +1271,10 @@ let MediaWiki = (() => {
|
|
|
1267
1271
|
const { config: { tagModes } } = this;
|
|
1268
1272
|
state.extName = name;
|
|
1269
1273
|
state.extMode ||= name in tagModes && (tagModes[name]) in this
|
|
1270
|
-
&& this[tagModes[name]](
|
|
1274
|
+
&& this[tagModes[name]]([
|
|
1275
|
+
...state.data.tags.filter(tag => tag !== name),
|
|
1276
|
+
...name === 'translate' ? ['tvar'] : [],
|
|
1277
|
+
]);
|
|
1271
1278
|
if (state.extMode) {
|
|
1272
1279
|
state.extState = state.extMode.startState(0);
|
|
1273
1280
|
}
|
|
@@ -1531,7 +1538,9 @@ let MediaWiki = (() => {
|
|
|
1531
1538
|
return makeLocalTagStyle('comment', state);
|
|
1532
1539
|
}
|
|
1533
1540
|
else if (stream.match(/^<\/?onlyinclude>/u)
|
|
1534
|
-
|| stream.match(/^<(?:(?:includeonly|noinclude)(?:\s[^>]*)?\/?>|\/(?:includeonly|noinclude)\s*>)/iu)
|
|
1541
|
+
|| stream.match(/^<(?:(?:includeonly|noinclude)(?:\s[^>]*)?\/?>|\/(?:includeonly|noinclude)\s*>)/iu)
|
|
1542
|
+
|| state.data.tags.includes('tvar')
|
|
1543
|
+
&& stream.match(/^<(?:tvar\s[^>]*>|\/tvar\s*>)/iu)) {
|
|
1535
1544
|
return makeLocalTagStyle('comment', state);
|
|
1536
1545
|
}
|
|
1537
1546
|
else if (stream.eat('|')) {
|