@bhsd/codemirror-mediawiki 2.26.0 → 2.27.1
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/README.md +4 -7
- package/dist/css.d.ts +3 -0
- package/dist/javascript.d.ts +3 -0
- package/dist/keybindings.d.mts +15 -0
- package/dist/keybindings.d.ts +15 -0
- package/dist/keybindings.mjs +34 -0
- package/dist/lua.d.ts +3 -0
- package/dist/main.min.js +19 -19
- package/dist/mw.min.js +23 -23
- package/dist/token.d.ts +10 -5
- package/dist/wiki.min.js +23 -23
- package/i18n/en.json +1 -2
- package/i18n/zh-hans.json +1 -2
- package/i18n/zh-hant.json +1 -2
- package/package.json +4 -4
- package/dist/plugins.d.ts +0 -7
package/dist/token.d.ts
CHANGED
|
@@ -19,9 +19,9 @@ declare interface Nesting extends Record<NestCount, number> {
|
|
|
19
19
|
extState: object | false;
|
|
20
20
|
}
|
|
21
21
|
declare interface State extends Nesting {
|
|
22
|
-
tokenize: Tokenizer;
|
|
23
22
|
readonly stack: Tokenizer[];
|
|
24
23
|
readonly inHtmlTag: string[];
|
|
24
|
+
tokenize: Tokenizer;
|
|
25
25
|
extMode: StreamParser<object> | false;
|
|
26
26
|
lbrack: boolean | undefined;
|
|
27
27
|
bold: boolean;
|
|
@@ -38,10 +38,11 @@ declare interface State extends Nesting {
|
|
|
38
38
|
data: MediaWikiData;
|
|
39
39
|
}
|
|
40
40
|
declare interface Token {
|
|
41
|
-
|
|
41
|
+
readonly char?: string | undefined;
|
|
42
42
|
readonly string: string;
|
|
43
|
-
style: Style;
|
|
44
43
|
readonly state: State;
|
|
44
|
+
pos: number;
|
|
45
|
+
style: Style;
|
|
45
46
|
}
|
|
46
47
|
declare interface StringStream extends StringStreamBase {
|
|
47
48
|
match(pattern: string, consume?: boolean, caseInsensitive?: boolean): true | null;
|
|
@@ -95,6 +96,7 @@ export declare class MediaWiki {
|
|
|
95
96
|
readonly redirectRegex: RegExp;
|
|
96
97
|
readonly img: string[];
|
|
97
98
|
readonly imgRegex: RegExp;
|
|
99
|
+
readonly convertRegex: RegExp;
|
|
98
100
|
readonly convertSemicolon: RegExp | undefined;
|
|
99
101
|
readonly convertLang: RegExp | undefined;
|
|
100
102
|
readonly tags: string[];
|
|
@@ -150,8 +152,8 @@ export declare class MediaWiki {
|
|
|
150
152
|
eatExtTagArea(name: string): Tokenizer;
|
|
151
153
|
inExtTokens(origString: string): Tokenizer;
|
|
152
154
|
inVariable(pos?: number): Tokenizer;
|
|
153
|
-
eatTransclusion(stream: StringStream, state: State
|
|
154
|
-
inParserFunctionName(invoke?: number, n?: number, ns?: number): Tokenizer;
|
|
155
|
+
eatTransclusion(stream: StringStream, state: State): string | undefined;
|
|
156
|
+
inParserFunctionName(invoke?: number, n?: number, ns?: number, subst?: boolean): Tokenizer;
|
|
155
157
|
inTemplatePageName(haveEaten?: boolean, anchor?: boolean): Tokenizer;
|
|
156
158
|
inParserFunctionArgument(module?: number, n?: number, ns?: number): Tokenizer;
|
|
157
159
|
inTemplateArgument(expectName?: boolean, parserFunction?: boolean): Tokenizer;
|
|
@@ -177,5 +179,8 @@ export declare class MediaWiki {
|
|
|
177
179
|
'text/inputbox'(): StreamParser<State>;
|
|
178
180
|
inGallery(section?: boolean): Tokenizer;
|
|
179
181
|
'text/gallery'(tags: string[]): StreamParser<State>;
|
|
182
|
+
javascript(): StreamParser<unknown>;
|
|
183
|
+
css(): StreamParser<unknown>;
|
|
184
|
+
json(): StreamParser<unknown>;
|
|
180
185
|
}
|
|
181
186
|
export {};
|