wikiparser-node 1.12.5 → 1.12.6
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/base.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/src/attribute.js +2 -2
- package/package.json +1 -1
package/dist/base.d.ts
CHANGED
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 {
|
|
@@ -28,6 +28,6 @@ declare const Parser: Parser;
|
|
|
28
28
|
// @ts-expect-error mixed export styles
|
|
29
29
|
export = Parser;
|
|
30
30
|
export default Parser;
|
|
31
|
-
export type { Config, LintError };
|
|
31
|
+
export type { Config, LintError, TokenTypes };
|
|
32
32
|
export type * from './internal';
|
|
33
33
|
declare global { type Acceptable = unknown; }
|
package/dist/src/attribute.js
CHANGED
|
@@ -352,8 +352,8 @@ let AttributeToken = (() => {
|
|
|
352
352
|
errors.push(e);
|
|
353
353
|
}
|
|
354
354
|
const attrs = extAttrs[tag];
|
|
355
|
-
if (!
|
|
356
|
-
&& (type === 'ext-attr'
|
|
355
|
+
if (!attrs?.has(name)
|
|
356
|
+
&& (type === 'ext-attr' ? attrs : !/\{\{[^{]+\}\}/u.test(name))
|
|
357
357
|
&& (type === 'ext-attr' && !(tag in htmlAttrs)
|
|
358
358
|
|| !htmlAttrs[tag]?.has(name)
|
|
359
359
|
&& !/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(name)
|