@markuplint/parser-utils 2.0.0 → 2.0.1-dev.20220307.0
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/lib/const.d.ts +1 -1
- package/lib/create-token.d.ts +1 -6
- package/lib/get-location.d.ts +8 -12
- package/lib/idl-attributes.d.ts +2 -2
- package/lib/parser-error.d.ts +11 -19
- package/lib/types.d.ts +11 -11
- package/package.json +4 -4
package/lib/const.d.ts
CHANGED
package/lib/create-token.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { MLToken } from '@markuplint/ml-ast';
|
|
2
|
-
export declare function tokenizer(
|
|
3
|
-
raw: string | null,
|
|
4
|
-
startLine: number,
|
|
5
|
-
startCol: number,
|
|
6
|
-
startOffset: number,
|
|
7
|
-
): MLToken;
|
|
2
|
+
export declare function tokenizer(raw: string | null, startLine: number, startCol: number, startOffset: number): MLToken;
|
|
8
3
|
export declare function createTokenFromRawCode(raw: string | null, startOffset: number, rawCode: string): MLToken;
|
|
9
4
|
export declare function uuid(): string;
|
package/lib/get-location.d.ts
CHANGED
|
@@ -2,16 +2,12 @@ export declare function getLine(html: string, startOffset: number): number;
|
|
|
2
2
|
export declare function getCol(html: string, startOffset: number): number;
|
|
3
3
|
export declare function getEndLine(html: string, line: number): number;
|
|
4
4
|
export declare function getEndCol(html: string, col: number): number;
|
|
5
|
-
export declare function sliceFragment(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
endLine: number;
|
|
14
|
-
startCol: number;
|
|
15
|
-
endCol: number;
|
|
16
|
-
raw: string;
|
|
5
|
+
export declare function sliceFragment(rawHtml: string, start: number, end: number): {
|
|
6
|
+
startOffset: number;
|
|
7
|
+
endOffset: number;
|
|
8
|
+
startLine: number;
|
|
9
|
+
endLine: number;
|
|
10
|
+
startCol: number;
|
|
11
|
+
endCol: number;
|
|
12
|
+
raw: string;
|
|
17
13
|
};
|
package/lib/idl-attributes.d.ts
CHANGED
package/lib/parser-error.d.ts
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
export declare class ParserError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
nodeName,
|
|
14
|
-
}: {
|
|
15
|
-
line?: number;
|
|
16
|
-
col?: number;
|
|
17
|
-
raw?: string;
|
|
18
|
-
nodeName?: string | null;
|
|
19
|
-
},
|
|
20
|
-
);
|
|
2
|
+
name: string;
|
|
3
|
+
readonly line: number;
|
|
4
|
+
readonly col: number;
|
|
5
|
+
readonly raw: string;
|
|
6
|
+
readonly nodeName: string | null;
|
|
7
|
+
constructor(message: string, { line, col, raw, nodeName, }: {
|
|
8
|
+
line?: number;
|
|
9
|
+
col?: number;
|
|
10
|
+
raw?: string;
|
|
11
|
+
nodeName?: string | null;
|
|
12
|
+
});
|
|
21
13
|
}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export declare type Code = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
type: string;
|
|
3
|
+
index: number;
|
|
4
|
+
startTag: string;
|
|
5
|
+
taggedCode: string;
|
|
6
|
+
endTag: string | null;
|
|
7
7
|
};
|
|
8
8
|
export declare type IgnoreTag = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
type: string;
|
|
10
|
+
start: RegExp;
|
|
11
|
+
end: RegExp;
|
|
12
12
|
};
|
|
13
13
|
export declare type IgnoreBlock = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
source: string;
|
|
15
|
+
replaced: string;
|
|
16
|
+
stack: Code[];
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/parser-utils",
|
|
3
|
-
"version": "2.0.0",
|
|
3
|
+
"version": "2.0.1-dev.20220307.0",
|
|
4
4
|
"description": "Utility module for markuplint parser plugin",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"@types/uuid": "^8.3.1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@markuplint/ml-ast": "2.0.0",
|
|
23
|
-
"@markuplint/types": "2.0.0",
|
|
22
|
+
"@markuplint/ml-ast": "2.0.1-dev.20220307.0",
|
|
23
|
+
"@markuplint/types": "2.0.1-dev.20220307.0",
|
|
24
24
|
"tslib": "^2.3.1",
|
|
25
25
|
"uuid": "^8.3.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "c0a9d36c32ae278bd2fdb9ec9434fd4af46918c3"
|
|
28
28
|
}
|