@yozora/tokenizer-blockquote 2.0.5 → 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.
@@ -1,14 +1,14 @@
1
- import { IPartialYastBlockToken, IYastBlockToken, ITokenizer, IBaseBlockTokenizerProps, IMatchBlockHookCreator, IParseBlockHookCreator, BaseBlockTokenizer, IBlockTokenizer } from '@yozora/core-tokenizer';
1
+ import { IPartialBlockToken, IBlockToken, ITokenizer, IBaseBlockTokenizerProps, IMatchBlockHookCreator, IParseBlockHookCreator, BaseBlockTokenizer, IBlockTokenizer } from '@yozora/core-tokenizer';
2
2
  import { BlockquoteType, Blockquote } from '@yozora/ast';
3
3
 
4
4
  type T = BlockquoteType;
5
5
  type INode = Blockquote;
6
6
  declare const uniqueName = "@yozora/tokenizer-blockquote";
7
- interface IToken extends IPartialYastBlockToken<T> {
7
+ interface IToken extends IPartialBlockToken<T> {
8
8
  /**
9
9
  *
10
10
  */
11
- children: IYastBlockToken[];
11
+ children: IBlockToken[];
12
12
  }
13
13
  type IThis = ITokenizer;
14
14
  type ITokenizerProps = Partial<IBaseBlockTokenizerProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yozora/tokenizer-blockquote",
3
- "version": "2.0.5",
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.5",
43
- "@yozora/character": "^2.0.5",
44
- "@yozora/core-tokenizer": "^2.0.5"
42
+ "@yozora/ast": "^2.1.0",
43
+ "@yozora/character": "^2.1.0",
44
+ "@yozora/core-tokenizer": "^2.1.0"
45
45
  },
46
- "gitHead": "7ba3bab49fe65cf2f57082c0503af73da9356cf0"
46
+ "gitHead": "387a68e8f9154944e2a6a7009a808d076d0659c6"
47
47
  }
package/src/match.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { BlockquoteType } from '@yozora/ast'
2
2
  import { AsciiCodePoint, VirtualCodePoint, isSpaceCharacter } from '@yozora/character'
3
3
  import type {
4
+ IBlockToken,
4
5
  IMatchBlockHookCreator,
5
6
  IPhrasingContentLine,
6
7
  IResultOfEatAndInterruptPreviousSibling,
7
8
  IResultOfEatContinuationText,
8
9
  IResultOfEatOpener,
9
- IYastBlockToken,
10
10
  } from '@yozora/core-tokenizer'
11
11
  import { calcEndPoint, calcStartPoint } from '@yozora/core-tokenizer'
12
12
  import type { IThis, IToken, T } from './types'
@@ -89,7 +89,7 @@ export const match: IMatchBlockHookCreator<T, IToken, IThis> = function () {
89
89
 
90
90
  function eatAndInterruptPreviousSibling(
91
91
  line: Readonly<IPhrasingContentLine>,
92
- prevSiblingToken: Readonly<IYastBlockToken>,
92
+ prevSiblingToken: Readonly<IBlockToken>,
93
93
  ): IResultOfEatAndInterruptPreviousSibling<T, IToken> {
94
94
  const result = eatOpener(line)
95
95
  if (result == null) return null
@@ -103,7 +103,7 @@ export const match: IMatchBlockHookCreator<T, IToken, IThis> = function () {
103
103
  function eatContinuationText(
104
104
  line: Readonly<IPhrasingContentLine>,
105
105
  token: IToken,
106
- parentToken: Readonly<IYastBlockToken>,
106
+ parentToken: Readonly<IBlockToken>,
107
107
  ): IResultOfEatContinuationText {
108
108
  const { nodePoints, startIndex, endIndex, firstNonWhitespaceIndex, countOfPrecedeSpaces } = line
109
109
 
package/src/types.ts CHANGED
@@ -1,20 +1,20 @@
1
1
  import type { Blockquote, BlockquoteType } from '@yozora/ast'
2
2
  import type {
3
3
  IBaseBlockTokenizerProps,
4
- IPartialYastBlockToken,
4
+ IBlockToken,
5
+ IPartialBlockToken,
5
6
  ITokenizer,
6
- IYastBlockToken,
7
7
  } from '@yozora/core-tokenizer'
8
8
 
9
9
  export type T = BlockquoteType
10
10
  export type INode = Blockquote
11
11
  export const uniqueName = '@yozora/tokenizer-blockquote'
12
12
 
13
- export interface IToken extends IPartialYastBlockToken<T> {
13
+ export interface IToken extends IPartialBlockToken<T> {
14
14
  /**
15
15
  *
16
16
  */
17
- children: IYastBlockToken[]
17
+ children: IBlockToken[]
18
18
  }
19
19
 
20
20
  export type IThis = ITokenizer