@bhsd/codemirror-mediawiki 2.14.5 → 2.14.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/main.min.js +15 -15
- package/dist/mw.min.js +19 -19
- package/dist/token.d.ts +2 -17
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/mediawiki.css +7 -1
- package/package.json +1 -1
package/dist/token.d.ts
CHANGED
|
@@ -94,7 +94,6 @@ declare interface State extends Nesting {
|
|
|
94
94
|
redirect: boolean;
|
|
95
95
|
data: MediaWikiData;
|
|
96
96
|
}
|
|
97
|
-
declare type ExtState = Omit<State, 'dt'> & Partial<Pick<State, 'dt'>>;
|
|
98
97
|
declare interface Token {
|
|
99
98
|
pos: number;
|
|
100
99
|
readonly string: string;
|
|
@@ -175,14 +174,9 @@ export declare class MediaWiki {
|
|
|
175
174
|
/**
|
|
176
175
|
* Register the ground tokens. These aren't referenced directly in the StreamParser, nor do
|
|
177
176
|
* they have a parent Tag, so we don't need them as constants like we do for other tokens.
|
|
178
|
-
* See
|
|
177
|
+
* See makeLocalStyle() for how these tokens are used.
|
|
179
178
|
*/
|
|
180
179
|
registerGroundTokens(): void;
|
|
181
|
-
makeFullStyle(style: Style, state: ExtState): string;
|
|
182
|
-
makeTagStyle(tag: TagName, state: State, endGround?: NestCount): [string];
|
|
183
|
-
makeStyle(style: string, state: ExtState, endGround?: NestCount): [string];
|
|
184
|
-
makeLocalTagStyle(tag: TagName, state: State, endGround?: NestCount): string;
|
|
185
|
-
makeLocalStyle(style: string, state: ExtState, endGround?: NestCount): string;
|
|
186
180
|
inStr(str: string, tag: TagName | false, errorTag?: TagName): Tokenizer;
|
|
187
181
|
eatWikiText(style: string): Tokenizer;
|
|
188
182
|
eatApostrophes(obj: Pick<State, 'bold' | 'italic'>): Tokenizer<string | false>;
|
|
@@ -202,7 +196,7 @@ export declare class MediaWiki {
|
|
|
202
196
|
get inComment(): Tokenizer;
|
|
203
197
|
eatTagName(name: string, isCloseTag?: boolean, isHtmlTag?: boolean): Tokenizer;
|
|
204
198
|
inHtmlTagAttribute(name: string, quote?: string): Tokenizer;
|
|
205
|
-
inExtTagAttribute(name: string, quote?: string): Tokenizer;
|
|
199
|
+
inExtTagAttribute(name: string, quote?: string, isLang?: boolean): Tokenizer;
|
|
206
200
|
eatExtTagArea(name: string): Tokenizer;
|
|
207
201
|
inExtTokens(origString: string): Tokenizer;
|
|
208
202
|
inVariable(pos?: number): Tokenizer;
|
|
@@ -213,15 +207,6 @@ export declare class MediaWiki {
|
|
|
213
207
|
inTemplateArgument(expectName?: boolean): Tokenizer;
|
|
214
208
|
inConvert(style: string, needFlag?: boolean, needLang?: boolean): Tokenizer;
|
|
215
209
|
eatEntity(stream: StringStream, style: string): string;
|
|
216
|
-
/**
|
|
217
|
-
* Remembers position and status for rollbacking.
|
|
218
|
-
* It is needed for changing from bold to italic with apostrophes before it, if required.
|
|
219
|
-
*
|
|
220
|
-
* @see https://phabricator.wikimedia.org/T108455
|
|
221
|
-
* @param stream
|
|
222
|
-
* @param state
|
|
223
|
-
*/
|
|
224
|
-
prepareItalicForCorrection(stream: StringStream, state: State): void;
|
|
225
210
|
/**
|
|
226
211
|
* main entry
|
|
227
212
|
*
|
package/i18n/en.json
CHANGED
package/i18n/zh-hans.json
CHANGED
package/i18n/zh-hant.json
CHANGED
package/mediawiki.css
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
line-height: 1.2;
|
|
7
7
|
padding: 0 1px;
|
|
8
|
+
opacity: .6;
|
|
9
|
+
}
|
|
10
|
+
.cm-tooltip-fold:hover {
|
|
11
|
+
opacity: 1;
|
|
8
12
|
}
|
|
9
13
|
.cm-focused .cm-matchingTag {
|
|
10
14
|
background-color: rgba(50, 140, 130, .32);
|
|
@@ -38,8 +42,10 @@
|
|
|
38
42
|
z-index: 7;
|
|
39
43
|
}
|
|
40
44
|
.cm-bidi-isolate {
|
|
41
|
-
direction: ltr;
|
|
42
45
|
unicode-bidi: isolate;
|
|
46
|
+
}
|
|
47
|
+
.cm-bidi-ltr {
|
|
48
|
+
direction: ltr;
|
|
43
49
|
display: inline-block;
|
|
44
50
|
}
|
|
45
51
|
|