@yozora/tokenizer-definition 1.2.2 → 2.0.0-alpha.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/README.md +4 -6
- package/lib/cjs/index.js +149 -145
- package/lib/esm/index.js +148 -146
- package/lib/types/index.d.ts +4 -4
- package/lib/types/match.d.ts +18 -0
- package/lib/types/parse.d.ts +3 -0
- package/lib/types/tokenizer.d.ts +6 -38
- package/lib/types/types.d.ts +7 -6
- package/lib/types/util/link-destination.d.ts +5 -5
- package/lib/types/util/link-label.d.ts +5 -5
- package/lib/types/util/link-title.d.ts +5 -5
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { INodePoint } from '@yozora/character';
|
|
2
2
|
/**
|
|
3
3
|
* The processing token of eatAndCollectLinkDestination, used to save
|
|
4
4
|
* intermediate data to support multiple codePosition fragment processing
|
|
@@ -13,7 +13,7 @@ export interface LinkDestinationCollectingState {
|
|
|
13
13
|
/**
|
|
14
14
|
* Collected token points
|
|
15
15
|
*/
|
|
16
|
-
nodePoints:
|
|
16
|
+
nodePoints: INodePoint[];
|
|
17
17
|
/**
|
|
18
18
|
* Whether an opening angle bracket has been matched
|
|
19
19
|
*/
|
|
@@ -28,10 +28,10 @@ export interface LinkDestinationCollectingState {
|
|
|
28
28
|
* @param nodePoints
|
|
29
29
|
* @param startIndex
|
|
30
30
|
* @param endIndex
|
|
31
|
-
* @param
|
|
31
|
+
* @param state
|
|
32
32
|
* @see https://github.github.com/gfm/#link-destination
|
|
33
33
|
*/
|
|
34
|
-
export declare function eatAndCollectLinkDestination(nodePoints: ReadonlyArray<
|
|
34
|
+
export declare function eatAndCollectLinkDestination(nodePoints: ReadonlyArray<INodePoint>, startIndex: number, endIndex: number, state: LinkDestinationCollectingState | null): {
|
|
35
35
|
nextIndex: number;
|
|
36
|
-
|
|
36
|
+
state: LinkDestinationCollectingState;
|
|
37
37
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { INodePoint } from '@yozora/character';
|
|
2
2
|
/**
|
|
3
3
|
* The processing token of eatAndCollectLinkLabel, used to save
|
|
4
4
|
* intermediate data to support multiple codePosition fragment processing
|
|
@@ -13,7 +13,7 @@ export interface LinkLabelCollectingState {
|
|
|
13
13
|
/**
|
|
14
14
|
* Collected token points
|
|
15
15
|
*/
|
|
16
|
-
nodePoints:
|
|
16
|
+
nodePoints: INodePoint[];
|
|
17
17
|
/**
|
|
18
18
|
* Does it contain non-blank characters
|
|
19
19
|
*/
|
|
@@ -35,10 +35,10 @@ export interface LinkLabelCollectingState {
|
|
|
35
35
|
* @param nodePoints
|
|
36
36
|
* @param startIndex
|
|
37
37
|
* @param endIndex
|
|
38
|
-
* @param
|
|
38
|
+
* @param state
|
|
39
39
|
* @see https://github.github.com/gfm/#link-label
|
|
40
40
|
*/
|
|
41
|
-
export declare function eatAndCollectLinkLabel(nodePoints: ReadonlyArray<
|
|
41
|
+
export declare function eatAndCollectLinkLabel(nodePoints: ReadonlyArray<INodePoint>, startIndex: number, endIndex: number, state: LinkLabelCollectingState | null): {
|
|
42
42
|
nextIndex: number;
|
|
43
|
-
|
|
43
|
+
state: LinkLabelCollectingState;
|
|
44
44
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { INodePoint } from '@yozora/character';
|
|
2
2
|
/**
|
|
3
3
|
* The processing token of eatAndCollectLinkDestination, used to save
|
|
4
4
|
* intermediate data to support multiple codePosition fragment processing.
|
|
@@ -13,7 +13,7 @@ export interface LinkTitleCollectingState {
|
|
|
13
13
|
/**
|
|
14
14
|
* Collected token points
|
|
15
15
|
*/
|
|
16
|
-
nodePoints:
|
|
16
|
+
nodePoints: INodePoint[];
|
|
17
17
|
/**
|
|
18
18
|
* Character that wrap link-title
|
|
19
19
|
*/
|
|
@@ -24,10 +24,10 @@ export interface LinkTitleCollectingState {
|
|
|
24
24
|
* @param nodePoints
|
|
25
25
|
* @param startIndex
|
|
26
26
|
* @param endIndex
|
|
27
|
-
* @param
|
|
27
|
+
* @param state
|
|
28
28
|
* @see https://github.github.com/gfm/#link-title
|
|
29
29
|
*/
|
|
30
|
-
export declare function eatAndCollectLinkTitle(nodePoints: ReadonlyArray<
|
|
30
|
+
export declare function eatAndCollectLinkTitle(nodePoints: ReadonlyArray<INodePoint>, startIndex: number, endIndex: number, state: LinkTitleCollectingState | null): {
|
|
31
31
|
nextIndex: number;
|
|
32
|
-
|
|
32
|
+
state: LinkTitleCollectingState;
|
|
33
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-definition",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "guanghechen",
|
|
6
6
|
"url": "https://github.com/guanghechen/"
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yozora/ast": "^
|
|
39
|
-
"@yozora/character": "^
|
|
40
|
-
"@yozora/core-tokenizer": "^
|
|
38
|
+
"@yozora/ast": "^2.0.0-alpha.2",
|
|
39
|
+
"@yozora/character": "^2.0.0-alpha.2",
|
|
40
|
+
"@yozora/core-tokenizer": "^2.0.0-alpha.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "da59d85520455c59a117a35032ef1a035c10ea21"
|
|
43
43
|
}
|