@bhsd/codemirror-mediawiki 3.10.2 → 3.11.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/README.md +1 -1
- package/dist/codemirror.d.ts +3 -1
- package/dist/codemirror.js +8 -1
- package/dist/hover.js +1 -1
- package/dist/html.d.ts +2 -1
- package/dist/html.js +3 -2
- package/dist/javascript-globals.d.ts +1 -0
- package/dist/javascript-globals.js +68 -0
- package/dist/javascript.d.ts +4 -2
- package/dist/javascript.js +46 -22
- package/dist/lintsource.d.ts +2 -1
- package/dist/lintsource.js +24 -2
- package/dist/main.min.js +42 -37
- package/dist/matchTag.js +1 -1
- package/dist/mediawiki.js +2 -2
- package/dist/mw.min.js +45 -40
- package/dist/mwConfig.js +14 -82
- package/dist/openLinks.js +1 -1
- package/dist/ref.js +1 -1
- package/dist/signature.d.ts +4 -1
- package/dist/signature.js +34 -9
- package/dist/token.d.ts +1 -0
- package/dist/util.d.ts +7 -2
- package/dist/util.js +28 -5
- package/dist/vue.d.ts +2 -1
- package/dist/vue.js +3 -2
- package/dist/wiki.min.js +44 -40
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +17 -20
package/dist/matchTag.js
CHANGED
|
@@ -101,7 +101,7 @@ export const matchTag = (state, pos) => {
|
|
|
101
101
|
return null;
|
|
102
102
|
}
|
|
103
103
|
let node = tree.resolveInner(pos, -1);
|
|
104
|
-
if (!isTag(node)) {
|
|
104
|
+
if (node.to === pos && !isTag(node)) {
|
|
105
105
|
node = tree.resolveInner(pos, 1);
|
|
106
106
|
}
|
|
107
107
|
const start = getTag(state, node);
|
package/dist/mediawiki.js
CHANGED
|
@@ -242,10 +242,10 @@ export class FullMediaWiki extends MediaWiki {
|
|
|
242
242
|
if (isDelimiter
|
|
243
243
|
|| isArgument && !search.includes('=')
|
|
244
244
|
|| hasTag(types, 'template') && prevIsDelimiter) {
|
|
245
|
-
const page = findTemplateName(state, node);
|
|
245
|
+
const [page] = findTemplateName(state, node);
|
|
246
246
|
if (page) {
|
|
247
247
|
const equal = isArgument && state.sliceDoc(pos, t).trim() === '=' ? '' : '=', suggestions = await this.#paramSuggest(isDelimiter ? '' : search, page, equal);
|
|
248
|
-
if (suggestions
|
|
248
|
+
if (suggestions?.options.length) {
|
|
249
249
|
return {
|
|
250
250
|
from: isDelimiter ? pos : start + suggestions.offset,
|
|
251
251
|
options: suggestions.options,
|