@bhsd/codemirror-mediawiki 3.5.0 → 3.5.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/dist/codemirror.js +1 -1
- package/dist/lintsource.d.ts +6 -1
- package/dist/lintsource.js +1 -1
- package/dist/main.min.js +24 -24
- package/dist/mediawiki.d.ts +1 -1
- package/dist/mediawiki.js +2 -2
- package/dist/mw.min.js +28 -28
- package/dist/wiki.min.js +28 -28
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +5 -5
package/dist/codemirror.js
CHANGED
package/dist/lintsource.d.ts
CHANGED
|
@@ -4,11 +4,16 @@ import type { Language } from '@codemirror/language';
|
|
|
4
4
|
import type { Diagnostic } from '@codemirror/lint';
|
|
5
5
|
import type { Option, LiveOption } from './linter';
|
|
6
6
|
export type LintSource = ((state: EditorState) => Diagnostic[] | Promise<Diagnostic[]>) & {
|
|
7
|
-
delay?: number;
|
|
8
7
|
fixer?: (doc: Text, rule?: string) => string | Promise<string>;
|
|
9
8
|
};
|
|
10
9
|
export type LintSources = LintSource | [LintSource] | [LintSource, LintSource];
|
|
11
10
|
export type LintSourceGetter = (opt?: Option | LiveOption, view?: EditorView, nestedMWLanguage?: Language) => LintSource | Promise<LintSource>;
|
|
11
|
+
/**
|
|
12
|
+
* 获取Linter选项
|
|
13
|
+
* @param opt Linter选项
|
|
14
|
+
* @param runtime 是否为运行时选项
|
|
15
|
+
*/
|
|
16
|
+
export declare const getOpt: (opt: Option | LiveOption, runtime?: boolean) => Option | Promise<Option>;
|
|
12
17
|
export declare const getWikiLintSource: LintSourceGetter;
|
|
13
18
|
export declare const getJsLintSource: LintSourceGetter;
|
|
14
19
|
export declare const getCssLintSource: LintSourceGetter;
|
package/dist/lintsource.js
CHANGED
|
@@ -9,7 +9,7 @@ import { posToIndex } from './hover';
|
|
|
9
9
|
* @param opt Linter选项
|
|
10
10
|
* @param runtime 是否为运行时选项
|
|
11
11
|
*/
|
|
12
|
-
const getOpt = (opt, runtime) => typeof opt === 'function' ? opt(runtime) : opt;
|
|
12
|
+
export const getOpt = (opt, runtime) => typeof opt === 'function' ? opt(runtime) : opt;
|
|
13
13
|
/**
|
|
14
14
|
* 获取指定行列的位置
|
|
15
15
|
* @param doc 文档
|