Skip to content

Commit

Permalink
Merge branch 'mini' into noprint
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Aug 17, 2024
2 parents f0ad66e + 9ba535f commit 590e64a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
BuildMethod,
} from './util/constants';
import {tidy} from './util/string';
import type {Config, LintError, Parser as ParserBase} from './base';
import type {Config, LintError, TokenTypes, Parser as ParserBase} from './base';
import type {Title} from './lib/title';
import type {Token} from './internal';

Expand Down Expand Up @@ -171,5 +171,5 @@ Object.defineProperties(Parser, def);
// @ts-expect-error mixed export styles
export = Parser;
export default Parser;
export type {Config, LintError};
export type {Config, LintError, TokenTypes};
export type * from './internal';
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wikiparser-node",
"version": "1.12.4",
"version": "1.12.6",
"description": "A Node.js parser for MediaWiki markup with AST",
"keywords": [
"mediawiki",
Expand Down
4 changes: 2 additions & 2 deletions src/attribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ export abstract class AttributeToken extends Token {
}
const attrs = extAttrs[tag];
if (
!(attrs && attrs.has(name))
&& (type === 'ext-attr' || !/\{\{[^{]+\}\}/u.test(name))
!attrs?.has(name)
&& (type === 'ext-attr' ? attrs : !/\{\{[^{]+\}\}/u.test(name))
&& (
type === 'ext-attr' && !(tag in htmlAttrs)
|| !htmlAttrs[tag]?.has(name)
Expand Down

0 comments on commit 590e64a

Please sign in to comment.