wikilint 2.12.5 → 2.12.7
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/index.d.ts +2 -2
- package/dist/src/attribute.js +2 -2
- package/dist/src/transclude.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Config, LintError, Parser as ParserBase } from './base';
|
|
1
|
+
import type { Config, LintError, TokenTypes, Parser as ParserBase } from './base';
|
|
2
2
|
import type { Title } from './lib/title';
|
|
3
3
|
import type { Token } from './internal';
|
|
4
4
|
declare interface Parser extends ParserBase {
|
|
@@ -16,6 +16,6 @@ declare const Parser: Parser;
|
|
|
16
16
|
// @ts-expect-error mixed export styles
|
|
17
17
|
export = Parser;
|
|
18
18
|
export default Parser;
|
|
19
|
-
export type { Config, LintError };
|
|
19
|
+
export type { Config, LintError, TokenTypes };
|
|
20
20
|
export type * from './internal';
|
|
21
21
|
declare global { type Acceptable = unknown; }
|
package/dist/src/attribute.js
CHANGED
|
@@ -270,8 +270,8 @@ class AttributeToken extends index_2.Token {
|
|
|
270
270
|
errors.push(e);
|
|
271
271
|
}
|
|
272
272
|
const attrs = extAttrs[tag];
|
|
273
|
-
if (!
|
|
274
|
-
&& (type === 'ext-attr'
|
|
273
|
+
if (!attrs?.has(name)
|
|
274
|
+
&& (type === 'ext-attr' ? attrs : !/\{\{[^{]+\}\}/u.test(name))
|
|
275
275
|
&& (type === 'ext-attr' && !(tag in htmlAttrs)
|
|
276
276
|
|| !htmlAttrs[tag]?.has(name)
|
|
277
277
|
&& !/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(name)
|
package/dist/src/transclude.js
CHANGED
|
@@ -177,7 +177,7 @@ class TranscludeToken extends index_2.Token {
|
|
|
177
177
|
errors.push((0, lint_1.generateForChild)(childNodes[1], rect, 'invalid-invoke', 'illegal module name'));
|
|
178
178
|
}
|
|
179
179
|
else {
|
|
180
|
-
const child = childNodes[invoke ? 1 : 0], textNode = child.childNodes.find((c) => c.type === 'text' && c.data.includes('#'));
|
|
180
|
+
const child = childNodes[invoke ? 1 : 0], textNode = child.childNodes.find((c) => c.type === 'text' && (0, string_1.decodeHtml)(c.data).includes('#'));
|
|
181
181
|
if (textNode) {
|
|
182
182
|
const e = (0, lint_1.generateForChild)(child, rect, 'no-ignored', 'useless fragment');
|
|
183
183
|
e.fix = {
|