@yozora/tokenizer-fenced-block 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.
@@ -1,10 +1,10 @@
1
1
  import { NodeType, Node } from '@yozora/ast';
2
- import { IPartialYastBlockToken, IPhrasingContentLine, ITokenizer, IBaseBlockTokenizerProps, IMatchBlockPhaseApi, IMatchBlockHook, BaseBlockTokenizer, IBlockTokenizer, IMatchBlockHookCreator } from '@yozora/core-tokenizer';
2
+ import { IPartialBlockToken, IPhrasingContentLine, ITokenizer, IBaseBlockTokenizerProps, IMatchBlockPhaseApi, IMatchBlockHook, BaseBlockTokenizer, IBlockTokenizer, IMatchBlockHookCreator } from '@yozora/core-tokenizer';
3
3
  import { INodePoint, ICodePoint } from '@yozora/character';
4
4
 
5
5
  declare const FencedBlockType = "fencedBlock";
6
6
  type FencedBlockType = typeof FencedBlockType;
7
- interface IToken<T extends NodeType> extends IPartialYastBlockToken<T> {
7
+ interface IToken<T extends NodeType> extends IPartialBlockToken<T> {
8
8
  /**
9
9
  * Line indent of a fenced block.
10
10
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yozora/tokenizer-fenced-block",
3
- "version": "2.0.6",
3
+ "version": "2.1.0",
4
4
  "author": {
5
5
  "name": "guanghechen",
6
6
  "url": "https://github.com/guanghechen/"
@@ -38,9 +38,9 @@
38
38
  "prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build"
39
39
  },
40
40
  "dependencies": {
41
- "@yozora/ast": "^2.0.6",
42
- "@yozora/character": "^2.0.6",
43
- "@yozora/core-tokenizer": "^2.0.6"
41
+ "@yozora/ast": "^2.1.0",
42
+ "@yozora/character": "^2.1.0",
43
+ "@yozora/core-tokenizer": "^2.1.0"
44
44
  },
45
- "gitHead": "a263c5338103824347bac74d437051e9fbb6d791"
45
+ "gitHead": "387a68e8f9154944e2a6a7009a808d076d0659c6"
46
46
  }
package/src/match.ts CHANGED
@@ -2,13 +2,13 @@ import type { NodeType } from '@yozora/ast'
2
2
  import type { INodePoint } from '@yozora/character'
3
3
  import { calcTrimBoundaryOfCodePoints, isSpaceCharacter } from '@yozora/character'
4
4
  import type {
5
+ IBlockToken,
5
6
  IMatchBlockHook,
6
7
  IMatchBlockPhaseApi,
7
8
  IPhrasingContentLine,
8
9
  IResultOfEatAndInterruptPreviousSibling,
9
10
  IResultOfEatContinuationText,
10
11
  IResultOfEatOpener,
11
- IYastBlockToken,
12
12
  } from '@yozora/core-tokenizer'
13
13
  import { calcEndPoint, calcStartPoint, eatOptionalCharacters } from '@yozora/core-tokenizer'
14
14
  import type { IFencedBlockHookContext, IToken } from './types'
@@ -89,7 +89,7 @@ export function match<
89
89
 
90
90
  function eatAndInterruptPreviousSibling(
91
91
  line: Readonly<IPhrasingContentLine>,
92
- prevSiblingToken: Readonly<IYastBlockToken>,
92
+ prevSiblingToken: Readonly<IBlockToken>,
93
93
  ): IResultOfEatAndInterruptPreviousSibling<T, IToken<T>> {
94
94
  const result = eatOpener(line)
95
95
  if (result == null) return null
package/src/types.ts CHANGED
@@ -2,7 +2,7 @@ import type { NodeType } from '@yozora/ast'
2
2
  import type { ICodePoint, INodePoint } from '@yozora/character'
3
3
  import type {
4
4
  IBaseBlockTokenizerProps,
5
- IPartialYastBlockToken,
5
+ IPartialBlockToken,
6
6
  IPhrasingContentLine,
7
7
  ITokenizer,
8
8
  } from '@yozora/core-tokenizer'
@@ -11,7 +11,7 @@ export const FencedBlockType = 'fencedBlock'
11
11
  // eslint-disable-next-line @typescript-eslint/no-redeclare
12
12
  export type FencedBlockType = typeof FencedBlockType
13
13
 
14
- export interface IToken<T extends NodeType> extends IPartialYastBlockToken<T> {
14
+ export interface IToken<T extends NodeType> extends IPartialBlockToken<T> {
15
15
  /**
16
16
  * Line indent of a fenced block.
17
17
  */