@yozora/tokenizer-footnote-definition 2.0.2 → 2.0.3

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2021 guanghechen (me.guanghechen@gmail.com)
3
+ Copyright (c) 2020-2022 guanghechen (me.guanghechen@gmail.com)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yozora/tokenizer-footnote-definition",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "author": {
5
5
  "name": "guanghechen",
6
6
  "url": "https://github.com/guanghechen/"
@@ -30,14 +30,14 @@
30
30
  ],
31
31
  "scripts": {
32
32
  "build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js",
33
- "prebuild": "rimraf lib/ && tsc -p tsconfig.src.json --emitDeclarationOnly",
33
+ "prebuild": "rimraf lib/",
34
34
  "prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
35
35
  "test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
36
36
  },
37
37
  "dependencies": {
38
- "@yozora/ast": "^2.0.2",
39
- "@yozora/character": "^2.0.2",
40
- "@yozora/core-tokenizer": "^2.0.2"
38
+ "@yozora/ast": "^2.0.3",
39
+ "@yozora/character": "^2.0.3",
40
+ "@yozora/core-tokenizer": "^2.0.3"
41
41
  },
42
- "gitHead": "6911295e9eacfa29563fe93494704190e50625fd"
42
+ "gitHead": "8cc8f95cfebc8d752bc3272cdd24965f540c130b"
43
43
  }
@@ -1,22 +0,0 @@
1
- import type { IMatchBlockHookCreator } from '@yozora/core-tokenizer';
2
- import type { IThis, IToken, T } from './types';
3
- /**
4
- * A footnote reference definition consists of a footnote label, indented up
5
- * to three spaces, followed by a colon (:), optional whitespace (including up
6
- * to one line ending), a footnote contents consisted by paragraph-like strings.
7
- *
8
- * Unlike the link label, the footnote label should be on the same line and it
9
- * begins with a left bracket ([) followed by a caret (^), and ends with the
10
- * first right bracket (]) that is not backslash-escaped. Between the caret of
11
- * right bracket, there must be at least one non-whitespace character.
12
- * Unescaped square bracket characters are not allowed inside the opening creat
13
- * and closing square bracket of footnote labels. A footnote label can have at
14
- * most 999 characters inside the caret and right bracket.
15
- *
16
- * @see https://github.github.com/gfm/#link-label
17
- * @see https://github.github.com/gfm/#link-reference-definition
18
- * @see https://github.com/syntax-tree/mdast-util-footnote
19
- * @see https://github.com/remarkjs/remark-footnotes
20
- * @see https://www.markdownguide.org/extended-syntax/#footnotes
21
- */
22
- export declare const match: IMatchBlockHookCreator<T, IToken, IThis>;
@@ -1,3 +0,0 @@
1
- import type { IParseBlockHookCreator } from '@yozora/core-tokenizer';
2
- import type { INode, IThis, IToken, T } from './types';
3
- export declare const parse: IParseBlockHookCreator<T, IToken, INode, IThis>;
@@ -1,17 +0,0 @@
1
- import type { IBlockTokenizer, IMatchBlockHookCreator, IParseBlockHookCreator } from '@yozora/core-tokenizer';
2
- import { BaseBlockTokenizer } from '@yozora/core-tokenizer';
3
- import type { INode, IThis, IToken, ITokenizerProps, T } from './types';
4
- /**
5
- * Lexical Analyzer for FootnoteDefinition.
6
- * @see https://github.github.com/gfm/#link-label
7
- * @see https://github.github.com/gfm/#link-reference-definition
8
- * @see https://github.com/syntax-tree/mdast-util-footnote
9
- * @see https://github.com/remarkjs/remark-footnotes
10
- * @see https://www.markdownguide.org/extended-syntax/#footnotes
11
- */
12
- export declare class FootnoteDefinitionTokenizer extends BaseBlockTokenizer<T, IToken, INode, IThis> implements IBlockTokenizer<T, IToken, INode, IThis> {
13
- constructor(props?: ITokenizerProps);
14
- readonly indent = 4;
15
- readonly match: IMatchBlockHookCreator<T, IToken, IThis>;
16
- readonly parse: IParseBlockHookCreator<T, IToken, INode, IThis>;
17
- }
@@ -1,30 +0,0 @@
1
- import type { FootnoteDefinition, FootnoteDefinitionType } from '@yozora/ast';
2
- import type { INodeInterval, INodePoint } from '@yozora/character';
3
- import type { IBaseBlockTokenizerProps, IPartialYastBlockToken, ITokenizer, IYastBlockToken } from '@yozora/core-tokenizer';
4
- export declare type T = FootnoteDefinitionType;
5
- export declare type INode = FootnoteDefinition;
6
- export declare const uniqueName = "@yozora/tokenizer-footnote-definition";
7
- export interface IToken extends IPartialYastBlockToken<T> {
8
- /**
9
- * Footnote label
10
- */
11
- label: INodeInterval & {
12
- nodePoints: ReadonlyArray<INodePoint>;
13
- };
14
- /**
15
- *
16
- */
17
- children: IYastBlockToken[];
18
- /**
19
- * Resolved definition label.
20
- */
21
- _label?: string;
22
- /**
23
- * Resolved definition identifier.
24
- */
25
- _identifier?: string;
26
- }
27
- export interface IThis extends ITokenizer {
28
- indent: number;
29
- }
30
- export declare type ITokenizerProps = Partial<IBaseBlockTokenizerProps>;
@@ -1,18 +0,0 @@
1
- import type { INodePoint } from '@yozora/character';
2
- /**
3
- * Try to match a footnote label.
4
- *
5
- * Unlike the link label, the footnote label should be on the same line and it
6
- * begins with a left bracket ([) followed by a caret (^), and ends with the
7
- * first right bracket (]) that is not backslash-escaped. Between the caret of
8
- * right bracket, there must be at least one non-whitespace character.
9
- * Unescaped square bracket characters are not allowed inside the opening creat
10
- * and closing square bracket of footnote labels. A footnote label can have at
11
- * most 999 characters inside the caret and right bracket.
12
- *
13
- * @param nodePoints
14
- * @param firstNonWhitespaceIndex
15
- * @param endIndex
16
- * @see https://github.github.com/gfm/#link-label
17
- */
18
- export declare function eatFootnoteLabel(nodePoints: ReadonlyArray<INodePoint>, firstNonWhitespaceIndex: number, endIndex: number): number;