@yozora/tokenizer-blockquote 2.0.2-alpha.0 → 2.0.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 +45 -45
- package/lib/types/index.d.ts +55 -5
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<header>
|
|
4
4
|
<h1 align="center">
|
|
5
|
-
<a href="https://github.com/yozorajs/yozora/tree/
|
|
5
|
+
<a href="https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/blockquote#readme">@yozora/tokenizer-blockquote</a>
|
|
6
6
|
</h1>
|
|
7
7
|
<div align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/@yozora/tokenizer-blockquote">
|
|
@@ -192,53 +192,53 @@ Name | Type | Required | Default
|
|
|
192
192
|
|
|
193
193
|
[live-examples]: https://yozora.guanghechen.com/docs/package/tokenizer-blockquote#live-examples
|
|
194
194
|
[docpage]: https://yozora.guanghechen.com/docs/package/tokenizer-blockquote
|
|
195
|
-
[homepage]: https://github.com/yozorajs/yozora/tree/
|
|
195
|
+
[homepage]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/blockquote#readme
|
|
196
196
|
[gfm-spec]: https://github.github.com/gfm
|
|
197
197
|
[mdast-homepage]: https://github.com/syntax-tree/mdast
|
|
198
198
|
|
|
199
|
-
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/
|
|
200
|
-
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/
|
|
201
|
-
[@yozora/character]: https://github.com/yozorajs/yozora/tree/
|
|
202
|
-
[@yozora/eslint-config]: https://github.com/yozorajs/yozora/tree/
|
|
203
|
-
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/
|
|
204
|
-
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
205
|
-
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/
|
|
206
|
-
[@yozora/jest-for-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
207
|
-
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/
|
|
208
|
-
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/
|
|
209
|
-
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/
|
|
210
|
-
[@yozora/template-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
211
|
-
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/
|
|
212
|
-
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/
|
|
213
|
-
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/
|
|
214
|
-
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/
|
|
215
|
-
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/
|
|
216
|
-
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/
|
|
217
|
-
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/
|
|
218
|
-
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/
|
|
219
|
-
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/
|
|
220
|
-
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/
|
|
221
|
-
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/
|
|
222
|
-
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/
|
|
223
|
-
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/
|
|
224
|
-
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/
|
|
225
|
-
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/
|
|
226
|
-
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/
|
|
227
|
-
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/
|
|
228
|
-
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/
|
|
229
|
-
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/
|
|
230
|
-
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/
|
|
231
|
-
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/
|
|
232
|
-
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/
|
|
233
|
-
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/
|
|
234
|
-
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/
|
|
235
|
-
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/
|
|
236
|
-
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/
|
|
237
|
-
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/
|
|
238
|
-
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/
|
|
239
|
-
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/
|
|
240
|
-
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/
|
|
241
|
-
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/
|
|
199
|
+
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/ast#readme
|
|
200
|
+
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/ast-util#readme
|
|
201
|
+
[@yozora/character]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/character#readme
|
|
202
|
+
[@yozora/eslint-config]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/eslint-config#readme
|
|
203
|
+
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/core-parser#readme
|
|
204
|
+
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/core-tokenizer#readme
|
|
205
|
+
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/invariant#readme
|
|
206
|
+
[@yozora/jest-for-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/jest-for-tokenizer#readme
|
|
207
|
+
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser#readme
|
|
208
|
+
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser-gfm#readme
|
|
209
|
+
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser-gfm-ex#readme
|
|
210
|
+
[@yozora/template-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/template-tokenizer#readme
|
|
211
|
+
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/admonition#readme
|
|
212
|
+
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/autolink#readme
|
|
213
|
+
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/autolink-extension#readme
|
|
214
|
+
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/blockquote#readme
|
|
215
|
+
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/break#readme
|
|
216
|
+
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/definition#readme
|
|
217
|
+
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/delete#readme
|
|
218
|
+
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/ecma-import#readme
|
|
219
|
+
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/emphasis#readme
|
|
220
|
+
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/fenced-block#readme
|
|
221
|
+
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/fenced-code#readme
|
|
222
|
+
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote#readme
|
|
223
|
+
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote-definition#readme
|
|
224
|
+
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote-reference#readme
|
|
225
|
+
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/heading#readme
|
|
226
|
+
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/html-block#readme
|
|
227
|
+
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/html-inline#readme
|
|
228
|
+
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/image#readme
|
|
229
|
+
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/image-reference#readme
|
|
230
|
+
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/indented-code#readme
|
|
231
|
+
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-code#readme
|
|
232
|
+
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-math#readme
|
|
233
|
+
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/link#readme
|
|
234
|
+
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/link-reference#readme
|
|
235
|
+
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/list#readme
|
|
236
|
+
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/math#readme
|
|
237
|
+
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/paragraph#readme
|
|
238
|
+
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/setext-heading#readme
|
|
239
|
+
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/table#readme
|
|
240
|
+
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/text#readme
|
|
241
|
+
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/thematic-break#readme
|
|
242
242
|
|
|
243
243
|
[@yozora/react-admonition]: https://github.com/yozorajs/yozora-react/tree/main/packages/admonition#readme
|
|
244
244
|
[@yozora/react-blockquote]: https://github.com/yozorajs/yozora-react/tree/main/packages/blockquote#readme
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { IPartialYastBlockToken, IYastBlockToken, ITokenizer, IBaseBlockTokenizerProps, IMatchBlockHookCreator, IParseBlockHookCreator, BaseBlockTokenizer, IBlockTokenizer } from '@yozora/core-tokenizer';
|
|
2
|
+
import { BlockquoteType, Blockquote } from '@yozora/ast';
|
|
3
|
+
|
|
4
|
+
declare type T = BlockquoteType;
|
|
5
|
+
declare type INode = Blockquote;
|
|
6
|
+
declare const uniqueName = "@yozora/tokenizer-blockquote";
|
|
7
|
+
interface IToken extends IPartialYastBlockToken<T> {
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
children: IYastBlockToken[];
|
|
12
|
+
}
|
|
13
|
+
declare type IThis = ITokenizer;
|
|
14
|
+
declare type ITokenizerProps = Partial<IBaseBlockTokenizerProps>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A block quote marker consists of 0-3 spaces of initial indent, plus
|
|
18
|
+
* (a) the character > together with a following space, or
|
|
19
|
+
* (b) a single character > not followed by a space.
|
|
20
|
+
*
|
|
21
|
+
* The following rules define block quotes:
|
|
22
|
+
* - Basic case. If a string of lines Ls constitute a sequence of blocks Bs,
|
|
23
|
+
* then the result of prepending a block quote marker to the beginning of
|
|
24
|
+
* each line in Ls is a block quote containing Bs.
|
|
25
|
+
*
|
|
26
|
+
* - Laziness. If a string of lines Ls constitute a block quote with contents
|
|
27
|
+
* Bs, then the result of deleting the initial block quote marker from one
|
|
28
|
+
* or more lines in which the next non-whitespace character after the block
|
|
29
|
+
* quote marker is paragraph continuation text is a block quote with Bs as
|
|
30
|
+
* its content. Paragraph continuation text is text that will be parsed as
|
|
31
|
+
* part of the content of a paragraph, but does not occur at the beginning
|
|
32
|
+
* of the paragraph.
|
|
33
|
+
*
|
|
34
|
+
* - Consecutiveness. A document cannot contain two block quotes in a row
|
|
35
|
+
* unless there is a blank line between them.
|
|
36
|
+
*
|
|
37
|
+
* @see https://github.com/syntax-tree/mdast#blockquote
|
|
38
|
+
* @see https://github.github.com/gfm/#block-quotes
|
|
39
|
+
*/
|
|
40
|
+
declare const match: IMatchBlockHookCreator<T, IToken, IThis>;
|
|
41
|
+
|
|
42
|
+
declare const parse: IParseBlockHookCreator<T, IToken, INode, IThis>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Lexical Analyzer for Blockquote.
|
|
46
|
+
* @see https://github.com/syntax-tree/mdast#blockquote
|
|
47
|
+
* @see https://github.github.com/gfm/#block-quotes
|
|
48
|
+
*/
|
|
49
|
+
declare class BlockquoteTokenizer extends BaseBlockTokenizer<T, IToken, INode, IThis> implements IBlockTokenizer<T, IToken, INode, IThis> {
|
|
50
|
+
constructor(props?: ITokenizerProps);
|
|
51
|
+
readonly match: IMatchBlockHookCreator<T, IToken, IThis>;
|
|
52
|
+
readonly parse: IParseBlockHookCreator<T, IToken, INode, IThis>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { BlockquoteTokenizer, uniqueName as BlockquoteTokenizerName, IThis as IBlockquoteHookContext, IToken as IBlockquoteToken, ITokenizerProps as IBlockquoteTokenizerProps, match as blockquoteMatch, parse as blockquoteParse, BlockquoteTokenizer as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-blockquote",
|
|
3
|
-
"version": "2.0.2
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "guanghechen",
|
|
6
6
|
"url": "https://github.com/guanghechen/"
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"url": "https://github.com/yozorajs/yozora.git",
|
|
11
11
|
"directory": "tokenizers/blockquote"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/blockquote",
|
|
14
14
|
"main": "lib/cjs/index.js",
|
|
15
15
|
"module": "lib/esm/index.js",
|
|
16
16
|
"types": "lib/types/index.d.ts",
|
|
17
17
|
"source": "src/index.ts",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">= 16.0.0"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"lib/",
|
|
@@ -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": "^2.0.2
|
|
39
|
-
"@yozora/character": "^2.0.2
|
|
40
|
-
"@yozora/core-tokenizer": "^2.0.2
|
|
38
|
+
"@yozora/ast": "^2.0.2",
|
|
39
|
+
"@yozora/character": "^2.0.2",
|
|
40
|
+
"@yozora/core-tokenizer": "^2.0.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "6911295e9eacfa29563fe93494704190e50625fd"
|
|
43
43
|
}
|