@bhsd/codemirror-mediawiki 3.6.1 → 3.6.2

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.
@@ -10,14 +10,12 @@ export const findEnclosingBrackets = (node, pos, brackets) => {
10
10
  return { start: firstChild, end: lastChild, matched: true };
11
11
  }
12
12
  }
13
- ({ parent } = parent); // eslint-disable-line no-param-reassign
13
+ ({ parent } = parent);
14
14
  }
15
15
  return undefined;
16
16
  };
17
17
  export const findEnclosingPlainBrackets = (state, pos, config) => {
18
- const { brackets, maxScanDistance } = config, re = new RegExp(`[${
19
- // eslint-disable-next-line @typescript-eslint/no-misused-spread
20
- [...brackets].filter((_, i) => i % 2).map(c => c === ']' ? String.raw `\]` : c).join('')}]`, 'gu'), str = state.sliceDoc(pos, pos + maxScanDistance);
18
+ const { brackets, maxScanDistance } = config, re = new RegExp(`[${[...brackets].filter((_, i) => i % 2).map(c => c === ']' ? String.raw `\]` : c).join('')}]`, 'gu'), str = state.sliceDoc(pos, pos + maxScanDistance);
21
19
  let mt = re.exec(str);
22
20
  while (mt) {
23
21
  const result = matchBrackets(state, pos + mt.index + 1, -1, config), left = result?.end?.to;
package/dist/mediawiki.js CHANGED
@@ -104,7 +104,6 @@ export class FullMediaWiki extends MediaWiki {
104
104
  return undefined;
105
105
  }
106
106
  let subpage = false, search = str, offset = 0;
107
- /* eslint-disable no-param-reassign */
108
107
  if (search.startsWith('/')) {
109
108
  ns = 0;
110
109
  subpage = true;
@@ -131,7 +130,6 @@ export class FullMediaWiki extends MediaWiki {
131
130
  search = `${ns === -2 ? 'File' : prefix}:${search.slice(length)}`;
132
131
  }
133
132
  }
134
- /* eslint-enable no-param-reassign */
135
133
  const underscore = str.slice(offset).includes('_');
136
134
  return {
137
135
  offset,