@yozora/tokenizer-thematic-break 2.0.6 → 2.1.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/types/index.d.ts +2 -2
- package/package.json +5 -5
- package/src/match.ts +2 -2
- package/src/types.ts +2 -2
package/lib/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IPartialBlockToken, ITokenizer, IBaseBlockTokenizerProps, IMatchBlockHookCreator, IParseBlockHookCreator, BaseBlockTokenizer, IBlockTokenizer } from '@yozora/core-tokenizer';
|
|
2
2
|
import { ThematicBreakType, ThematicBreak } from '@yozora/ast';
|
|
3
3
|
|
|
4
4
|
type T = ThematicBreakType;
|
|
5
5
|
type INode = ThematicBreak;
|
|
6
6
|
declare const uniqueName = "@yozora/tokenizer-thematic-break";
|
|
7
|
-
interface IToken extends
|
|
7
|
+
interface IToken extends IPartialBlockToken<T> {
|
|
8
8
|
/**
|
|
9
9
|
* CodePoint of '-' / '_' / '*'
|
|
10
10
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-thematic-break",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "guanghechen",
|
|
6
6
|
"url": "https://github.com/guanghechen/"
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"test": "cross-env TS_NODE_FILES=true NODE_OPTIONS=--experimental-vm-modules jest --config ../../jest.config.mjs --rootDir ."
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@yozora/ast": "^2.0
|
|
43
|
-
"@yozora/character": "^2.0
|
|
44
|
-
"@yozora/core-tokenizer": "^2.0
|
|
42
|
+
"@yozora/ast": "^2.1.0",
|
|
43
|
+
"@yozora/character": "^2.1.0",
|
|
44
|
+
"@yozora/core-tokenizer": "^2.1.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "387a68e8f9154944e2a6a7009a808d076d0659c6"
|
|
47
47
|
}
|
package/src/match.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ThematicBreakType } from '@yozora/ast'
|
|
2
2
|
import { AsciiCodePoint, isUnicodeWhitespaceCharacter } from '@yozora/character'
|
|
3
3
|
import type {
|
|
4
|
+
IBlockToken,
|
|
4
5
|
IMatchBlockHookCreator,
|
|
5
6
|
IPhrasingContentLine,
|
|
6
7
|
IResultOfEatAndInterruptPreviousSibling,
|
|
7
8
|
IResultOfEatOpener,
|
|
8
|
-
IYastBlockToken,
|
|
9
9
|
} from '@yozora/core-tokenizer'
|
|
10
10
|
import { calcEndPoint, calcStartPoint } from '@yozora/core-tokenizer'
|
|
11
11
|
import type { IThis, IToken, T } from './types'
|
|
@@ -114,7 +114,7 @@ export const match: IMatchBlockHookCreator<T, IToken, IThis> = function () {
|
|
|
114
114
|
|
|
115
115
|
function eatAndInterruptPreviousSibling(
|
|
116
116
|
line: Readonly<IPhrasingContentLine>,
|
|
117
|
-
prevSiblingToken: Readonly<
|
|
117
|
+
prevSiblingToken: Readonly<IBlockToken>,
|
|
118
118
|
): IResultOfEatAndInterruptPreviousSibling<T, IToken> {
|
|
119
119
|
const result = eatOpener(line)
|
|
120
120
|
if (result == null) return null
|
package/src/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ThematicBreak, ThematicBreakType } from '@yozora/ast'
|
|
2
2
|
import type {
|
|
3
3
|
IBaseBlockTokenizerProps,
|
|
4
|
-
|
|
4
|
+
IPartialBlockToken,
|
|
5
5
|
ITokenizer,
|
|
6
6
|
} from '@yozora/core-tokenizer'
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ export type T = ThematicBreakType
|
|
|
9
9
|
export type INode = ThematicBreak
|
|
10
10
|
export const uniqueName = '@yozora/tokenizer-thematic-break'
|
|
11
11
|
|
|
12
|
-
export interface IToken extends
|
|
12
|
+
export interface IToken extends IPartialBlockToken<T> {
|
|
13
13
|
/**
|
|
14
14
|
* CodePoint of '-' / '_' / '*'
|
|
15
15
|
*/
|