@bhsd/codemirror-mediawiki 2.23.1 → 2.23.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.
- package/dist/main.min.js +17 -17
- package/dist/mw.min.js +20 -20
- package/dist/token.d.ts +11 -13
- package/dist/wiki.min.js +20 -20
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/mediawiki.css +1 -1
- package/package.json +3 -3
package/dist/token.d.ts
CHANGED
|
@@ -30,7 +30,10 @@ declare interface State extends Nesting {
|
|
|
30
30
|
n: number;
|
|
31
31
|
html: number;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
sof: boolean;
|
|
34
|
+
redirect: {
|
|
35
|
+
colon: boolean;
|
|
36
|
+
} | false;
|
|
34
37
|
imgLink: boolean;
|
|
35
38
|
data: MediaWikiData;
|
|
36
39
|
}
|
|
@@ -63,8 +66,8 @@ export interface MwConfig extends MwConfigBase {
|
|
|
63
66
|
implicitlyClosedHtmlTags?: string[];
|
|
64
67
|
linkSuggest?: ApiSuggest;
|
|
65
68
|
paramSuggest?: ApiSuggest;
|
|
66
|
-
titleParser?: (state: EditorState, node: SyntaxNode
|
|
67
|
-
isbnParser?: (link: string) =>
|
|
69
|
+
titleParser?: (state: EditorState, node: SyntaxNode) => string | undefined;
|
|
70
|
+
isbnParser?: (link: string) => string;
|
|
68
71
|
}
|
|
69
72
|
declare class MediaWikiData {
|
|
70
73
|
/** 已解析的节点 */
|
|
@@ -86,7 +89,7 @@ export declare class MediaWiki {
|
|
|
86
89
|
[x: string]: Tag;
|
|
87
90
|
};
|
|
88
91
|
readonly hiddenTable: Record<string, Tag>;
|
|
89
|
-
readonly permittedHtmlTags: Set<string>;
|
|
92
|
+
readonly permittedHtmlTags: Set<string | undefined>;
|
|
90
93
|
readonly implicitlyClosedHtmlTags: Set<string>;
|
|
91
94
|
readonly urlProtocols: RegExp;
|
|
92
95
|
readonly linkRegex: RegExp;
|
|
@@ -94,16 +97,11 @@ export declare class MediaWiki {
|
|
|
94
97
|
readonly redirectRegex: RegExp;
|
|
95
98
|
readonly img: string[];
|
|
96
99
|
readonly imgRegex: RegExp;
|
|
97
|
-
readonly headerRegex: RegExp;
|
|
98
|
-
readonly templateRegex: RegExp;
|
|
99
|
-
readonly argumentRegex: RegExp;
|
|
100
|
-
readonly styleRegex: RegExp;
|
|
101
100
|
readonly convertSemicolon: RegExp | undefined;
|
|
102
101
|
readonly convertLang: RegExp | undefined;
|
|
103
|
-
readonly convertRegex: RegExp;
|
|
104
|
-
readonly wikiRegex: RegExp;
|
|
105
|
-
readonly tableDefinitionRegex: RegExp;
|
|
106
102
|
readonly tags: string[];
|
|
103
|
+
readonly hasVariants: boolean;
|
|
104
|
+
readonly preRegex: [RegExp, RegExp];
|
|
107
105
|
constructor(config: MwConfig);
|
|
108
106
|
/**
|
|
109
107
|
* Dynamically register a token in CodeMirror.
|
|
@@ -145,9 +143,9 @@ export declare class MediaWiki {
|
|
|
145
143
|
inExtTokens(origString: string): Tokenizer;
|
|
146
144
|
inVariable(pos?: number): Tokenizer;
|
|
147
145
|
eatTransclusion(stream: StringStream, state: State, { length }: string): string | undefined;
|
|
148
|
-
inParserFunctionName(invoke?: number, n?: number): Tokenizer;
|
|
146
|
+
inParserFunctionName(invoke?: number, n?: number, ns?: number): Tokenizer;
|
|
149
147
|
inTemplatePageName(haveEaten?: boolean, anchor?: boolean): Tokenizer;
|
|
150
|
-
inParserFunctionArgument(module?: number, n?: number): Tokenizer;
|
|
148
|
+
inParserFunctionArgument(module?: number, n?: number, ns?: number): Tokenizer;
|
|
151
149
|
inTemplateArgument(expectName?: boolean, parserFunction?: boolean): Tokenizer;
|
|
152
150
|
inConvert(style: string, needFlag?: boolean, needLang?: boolean, plain?: boolean): Tokenizer;
|
|
153
151
|
eatEntity(stream: StringStream, style: string): string;
|