@yozora/tokenizer-footnote 2.0.0-alpha.0 → 2.0.0-alpha.1
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 +4 -6
- package/lib/cjs/index.js +70 -62
- package/lib/esm/index.js +70 -64
- package/lib/types/index.d.ts +3 -1
- package/lib/types/match.d.ts +15 -0
- package/lib/types/parse.d.ts +3 -0
- package/lib/types/tokenizer.d.ts +4 -10
- package/lib/types/types.d.ts +2 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -84,14 +84,14 @@ so you can use `YozoraParser` directly.
|
|
|
84
84
|
registered in *YastParser* as a plugin-in before it can be used.
|
|
85
85
|
|
|
86
86
|
```typescript {4,9}
|
|
87
|
-
import {
|
|
87
|
+
import { DefaultParser } from '@yozora/core-parser'
|
|
88
88
|
import ParagraphTokenizer from '@yozora/tokenizer-paragraph'
|
|
89
89
|
import TextTokenizer from '@yozora/tokenizer-text'
|
|
90
90
|
import FootnoteTokenizer from '@yozora/tokenizer-footnote'
|
|
91
91
|
|
|
92
|
-
const parser = new
|
|
93
|
-
.
|
|
94
|
-
.
|
|
92
|
+
const parser = new DefaultParser()
|
|
93
|
+
.useFallbackTokenizer(new ParagraphTokenizer())
|
|
94
|
+
.useFallbackTokenizer(new TextTokenizer())
|
|
95
95
|
.useTokenizer(new FootnoteTokenizer())
|
|
96
96
|
|
|
97
97
|
// parse source markdown content
|
|
@@ -234,7 +234,6 @@ Name | Type | Required | Default
|
|
|
234
234
|
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/main/tokenizers/link#readme
|
|
235
235
|
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/main/tokenizers/link-reference#readme
|
|
236
236
|
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/main/tokenizers/list#readme
|
|
237
|
-
[@yozora/tokenizer-list-item]: https://github.com/yozorajs/yozora/tree/main/tokenizers/list-item#readme
|
|
238
237
|
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/main/tokenizers/math#readme
|
|
239
238
|
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/main/tokenizers/paragraph#readme
|
|
240
239
|
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/main/tokenizers/setext-heading#readme
|
|
@@ -294,7 +293,6 @@ Name | Type | Required | Default
|
|
|
294
293
|
[doc-@yozora/tokenizer-definition]: https://yozora.guanghechen.com/docs/package/tokenizer-definition
|
|
295
294
|
[doc-@yozora/tokenizer-link-reference]: https://yozora.guanghechen.com/docs/package/tokenizer-link-reference
|
|
296
295
|
[doc-@yozora/tokenizer-list]: https://yozora.guanghechen.com/docs/package/tokenizer-list
|
|
297
|
-
[doc-@yozora/tokenizer-list-item]: https://yozora.guanghechen.com/docs/package/tokenizer-list-item
|
|
298
296
|
[doc-@yozora/tokenizer-math]: https://yozora.guanghechen.com/docs/package/tokenizer-math
|
|
299
297
|
[doc-@yozora/tokenizer-paragraph]: https://yozora.guanghechen.com/docs/package/tokenizer-paragraph
|
|
300
298
|
[doc-@yozora/tokenizer-setext-heading]: https://yozora.guanghechen.com/docs/package/tokenizer-setext-heading
|
package/lib/cjs/index.js
CHANGED
|
@@ -7,6 +7,72 @@ var character = require('@yozora/character');
|
|
|
7
7
|
var coreTokenizer = require('@yozora/core-tokenizer');
|
|
8
8
|
var tokenizerLink = require('@yozora/tokenizer-link');
|
|
9
9
|
|
|
10
|
+
const match = function (api) {
|
|
11
|
+
return {
|
|
12
|
+
findDelimiter: () => coreTokenizer.genFindDelimiter(_findDelimiter),
|
|
13
|
+
isDelimiterPair,
|
|
14
|
+
processDelimiterPair,
|
|
15
|
+
};
|
|
16
|
+
function _findDelimiter(startIndex, endIndex) {
|
|
17
|
+
const nodePoints = api.getNodePoints();
|
|
18
|
+
for (let i = startIndex; i < endIndex; ++i) {
|
|
19
|
+
const c = nodePoints[i].codePoint;
|
|
20
|
+
switch (c) {
|
|
21
|
+
case character.AsciiCodePoint.BACKSLASH:
|
|
22
|
+
i += 1;
|
|
23
|
+
break;
|
|
24
|
+
case character.AsciiCodePoint.CARET: {
|
|
25
|
+
if (i + 1 < endIndex && nodePoints[i + 1].codePoint === character.AsciiCodePoint.OPEN_BRACKET) {
|
|
26
|
+
return {
|
|
27
|
+
type: 'opener',
|
|
28
|
+
startIndex: i,
|
|
29
|
+
endIndex: i + 2,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
case character.AsciiCodePoint.CLOSE_BRACKET:
|
|
35
|
+
return {
|
|
36
|
+
type: 'closer',
|
|
37
|
+
startIndex: i,
|
|
38
|
+
endIndex: i + 1,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function isDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
45
|
+
const nodePoints = api.getNodePoints();
|
|
46
|
+
const balancedBracketsStatus = tokenizerLink.checkBalancedBracketsStatus(openerDelimiter.endIndex, closerDelimiter.startIndex, internalTokens, nodePoints);
|
|
47
|
+
switch (balancedBracketsStatus) {
|
|
48
|
+
case -1:
|
|
49
|
+
return { paired: false, opener: false, closer: true };
|
|
50
|
+
case 0:
|
|
51
|
+
return { paired: true };
|
|
52
|
+
case 1:
|
|
53
|
+
return { paired: false, opener: true, closer: false };
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function processDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
57
|
+
const token = {
|
|
58
|
+
nodeType: ast.FootnoteType,
|
|
59
|
+
startIndex: openerDelimiter.startIndex,
|
|
60
|
+
endIndex: closerDelimiter.endIndex,
|
|
61
|
+
children: api.resolveInternalTokens(internalTokens, openerDelimiter.endIndex, closerDelimiter.startIndex),
|
|
62
|
+
};
|
|
63
|
+
return { tokens: [token] };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const parse = function (api) {
|
|
68
|
+
return {
|
|
69
|
+
parse: (_token, children) => ({
|
|
70
|
+
type: ast.FootnoteType,
|
|
71
|
+
children,
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
10
76
|
const uniqueName = '@yozora/tokenizer-footnote';
|
|
11
77
|
|
|
12
78
|
class FootnoteTokenizer extends coreTokenizer.BaseInlineTokenizer {
|
|
@@ -16,71 +82,13 @@ class FootnoteTokenizer extends coreTokenizer.BaseInlineTokenizer {
|
|
|
16
82
|
name: (_a = props.name) !== null && _a !== void 0 ? _a : uniqueName,
|
|
17
83
|
priority: (_b = props.priority) !== null && _b !== void 0 ? _b : coreTokenizer.TokenizerPriority.LINKS,
|
|
18
84
|
});
|
|
19
|
-
this.match =
|
|
20
|
-
|
|
21
|
-
findDelimiter: () => coreTokenizer.genFindDelimiter(_findDelimiter),
|
|
22
|
-
isDelimiterPair,
|
|
23
|
-
processDelimiterPair,
|
|
24
|
-
};
|
|
25
|
-
function _findDelimiter(startIndex, endIndex) {
|
|
26
|
-
const nodePoints = api.getNodePoints();
|
|
27
|
-
for (let i = startIndex; i < endIndex; ++i) {
|
|
28
|
-
const c = nodePoints[i].codePoint;
|
|
29
|
-
switch (c) {
|
|
30
|
-
case character.AsciiCodePoint.BACKSLASH:
|
|
31
|
-
i += 1;
|
|
32
|
-
break;
|
|
33
|
-
case character.AsciiCodePoint.CARET: {
|
|
34
|
-
if (i + 1 < endIndex && nodePoints[i + 1].codePoint === character.AsciiCodePoint.OPEN_BRACKET) {
|
|
35
|
-
return {
|
|
36
|
-
type: 'opener',
|
|
37
|
-
startIndex: i,
|
|
38
|
-
endIndex: i + 2,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
case character.AsciiCodePoint.CLOSE_BRACKET:
|
|
44
|
-
return {
|
|
45
|
-
type: 'closer',
|
|
46
|
-
startIndex: i,
|
|
47
|
-
endIndex: i + 1,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
function isDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
54
|
-
const nodePoints = api.getNodePoints();
|
|
55
|
-
const balancedBracketsStatus = tokenizerLink.checkBalancedBracketsStatus(openerDelimiter.endIndex, closerDelimiter.startIndex, internalTokens, nodePoints);
|
|
56
|
-
switch (balancedBracketsStatus) {
|
|
57
|
-
case -1:
|
|
58
|
-
return { paired: false, opener: false, closer: true };
|
|
59
|
-
case 0:
|
|
60
|
-
return { paired: true };
|
|
61
|
-
case 1:
|
|
62
|
-
return { paired: false, opener: true, closer: false };
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function processDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
66
|
-
const token = {
|
|
67
|
-
nodeType: ast.FootnoteType,
|
|
68
|
-
startIndex: openerDelimiter.startIndex,
|
|
69
|
-
endIndex: closerDelimiter.endIndex,
|
|
70
|
-
children: api.resolveInternalTokens(internalTokens, openerDelimiter.endIndex, closerDelimiter.startIndex),
|
|
71
|
-
};
|
|
72
|
-
return { tokens: [token] };
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
this.parse = () => ({
|
|
76
|
-
parse: (_token, children) => ({
|
|
77
|
-
type: ast.FootnoteType,
|
|
78
|
-
children,
|
|
79
|
-
}),
|
|
80
|
-
});
|
|
85
|
+
this.match = match;
|
|
86
|
+
this.parse = parse;
|
|
81
87
|
}
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
exports.FootnoteTokenizer = FootnoteTokenizer;
|
|
85
91
|
exports.FootnoteTokenizerName = uniqueName;
|
|
86
92
|
exports["default"] = FootnoteTokenizer;
|
|
93
|
+
exports.footnoteMatch = match;
|
|
94
|
+
exports.footnoteParse = parse;
|
package/lib/esm/index.js
CHANGED
|
@@ -1,8 +1,74 @@
|
|
|
1
1
|
import { FootnoteType } from '@yozora/ast';
|
|
2
2
|
import { AsciiCodePoint } from '@yozora/character';
|
|
3
|
-
import { BaseInlineTokenizer, TokenizerPriority
|
|
3
|
+
import { genFindDelimiter, BaseInlineTokenizer, TokenizerPriority } from '@yozora/core-tokenizer';
|
|
4
4
|
import { checkBalancedBracketsStatus } from '@yozora/tokenizer-link';
|
|
5
5
|
|
|
6
|
+
const match = function (api) {
|
|
7
|
+
return {
|
|
8
|
+
findDelimiter: () => genFindDelimiter(_findDelimiter),
|
|
9
|
+
isDelimiterPair,
|
|
10
|
+
processDelimiterPair,
|
|
11
|
+
};
|
|
12
|
+
function _findDelimiter(startIndex, endIndex) {
|
|
13
|
+
const nodePoints = api.getNodePoints();
|
|
14
|
+
for (let i = startIndex; i < endIndex; ++i) {
|
|
15
|
+
const c = nodePoints[i].codePoint;
|
|
16
|
+
switch (c) {
|
|
17
|
+
case AsciiCodePoint.BACKSLASH:
|
|
18
|
+
i += 1;
|
|
19
|
+
break;
|
|
20
|
+
case AsciiCodePoint.CARET: {
|
|
21
|
+
if (i + 1 < endIndex && nodePoints[i + 1].codePoint === AsciiCodePoint.OPEN_BRACKET) {
|
|
22
|
+
return {
|
|
23
|
+
type: 'opener',
|
|
24
|
+
startIndex: i,
|
|
25
|
+
endIndex: i + 2,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
case AsciiCodePoint.CLOSE_BRACKET:
|
|
31
|
+
return {
|
|
32
|
+
type: 'closer',
|
|
33
|
+
startIndex: i,
|
|
34
|
+
endIndex: i + 1,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
function isDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
41
|
+
const nodePoints = api.getNodePoints();
|
|
42
|
+
const balancedBracketsStatus = checkBalancedBracketsStatus(openerDelimiter.endIndex, closerDelimiter.startIndex, internalTokens, nodePoints);
|
|
43
|
+
switch (balancedBracketsStatus) {
|
|
44
|
+
case -1:
|
|
45
|
+
return { paired: false, opener: false, closer: true };
|
|
46
|
+
case 0:
|
|
47
|
+
return { paired: true };
|
|
48
|
+
case 1:
|
|
49
|
+
return { paired: false, opener: true, closer: false };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function processDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
53
|
+
const token = {
|
|
54
|
+
nodeType: FootnoteType,
|
|
55
|
+
startIndex: openerDelimiter.startIndex,
|
|
56
|
+
endIndex: closerDelimiter.endIndex,
|
|
57
|
+
children: api.resolveInternalTokens(internalTokens, openerDelimiter.endIndex, closerDelimiter.startIndex),
|
|
58
|
+
};
|
|
59
|
+
return { tokens: [token] };
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const parse = function (api) {
|
|
64
|
+
return {
|
|
65
|
+
parse: (_token, children) => ({
|
|
66
|
+
type: FootnoteType,
|
|
67
|
+
children,
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
6
72
|
const uniqueName = '@yozora/tokenizer-footnote';
|
|
7
73
|
|
|
8
74
|
class FootnoteTokenizer extends BaseInlineTokenizer {
|
|
@@ -12,69 +78,9 @@ class FootnoteTokenizer extends BaseInlineTokenizer {
|
|
|
12
78
|
name: (_a = props.name) !== null && _a !== void 0 ? _a : uniqueName,
|
|
13
79
|
priority: (_b = props.priority) !== null && _b !== void 0 ? _b : TokenizerPriority.LINKS,
|
|
14
80
|
});
|
|
15
|
-
this.match =
|
|
16
|
-
|
|
17
|
-
findDelimiter: () => genFindDelimiter(_findDelimiter),
|
|
18
|
-
isDelimiterPair,
|
|
19
|
-
processDelimiterPair,
|
|
20
|
-
};
|
|
21
|
-
function _findDelimiter(startIndex, endIndex) {
|
|
22
|
-
const nodePoints = api.getNodePoints();
|
|
23
|
-
for (let i = startIndex; i < endIndex; ++i) {
|
|
24
|
-
const c = nodePoints[i].codePoint;
|
|
25
|
-
switch (c) {
|
|
26
|
-
case AsciiCodePoint.BACKSLASH:
|
|
27
|
-
i += 1;
|
|
28
|
-
break;
|
|
29
|
-
case AsciiCodePoint.CARET: {
|
|
30
|
-
if (i + 1 < endIndex && nodePoints[i + 1].codePoint === AsciiCodePoint.OPEN_BRACKET) {
|
|
31
|
-
return {
|
|
32
|
-
type: 'opener',
|
|
33
|
-
startIndex: i,
|
|
34
|
-
endIndex: i + 2,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
case AsciiCodePoint.CLOSE_BRACKET:
|
|
40
|
-
return {
|
|
41
|
-
type: 'closer',
|
|
42
|
-
startIndex: i,
|
|
43
|
-
endIndex: i + 1,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
function isDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
50
|
-
const nodePoints = api.getNodePoints();
|
|
51
|
-
const balancedBracketsStatus = checkBalancedBracketsStatus(openerDelimiter.endIndex, closerDelimiter.startIndex, internalTokens, nodePoints);
|
|
52
|
-
switch (balancedBracketsStatus) {
|
|
53
|
-
case -1:
|
|
54
|
-
return { paired: false, opener: false, closer: true };
|
|
55
|
-
case 0:
|
|
56
|
-
return { paired: true };
|
|
57
|
-
case 1:
|
|
58
|
-
return { paired: false, opener: true, closer: false };
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function processDelimiterPair(openerDelimiter, closerDelimiter, internalTokens) {
|
|
62
|
-
const token = {
|
|
63
|
-
nodeType: FootnoteType,
|
|
64
|
-
startIndex: openerDelimiter.startIndex,
|
|
65
|
-
endIndex: closerDelimiter.endIndex,
|
|
66
|
-
children: api.resolveInternalTokens(internalTokens, openerDelimiter.endIndex, closerDelimiter.startIndex),
|
|
67
|
-
};
|
|
68
|
-
return { tokens: [token] };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
this.parse = () => ({
|
|
72
|
-
parse: (_token, children) => ({
|
|
73
|
-
type: FootnoteType,
|
|
74
|
-
children,
|
|
75
|
-
}),
|
|
76
|
-
});
|
|
81
|
+
this.match = match;
|
|
82
|
+
this.parse = parse;
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
|
|
80
|
-
export { FootnoteTokenizer, uniqueName as FootnoteTokenizerName, FootnoteTokenizer as default };
|
|
86
|
+
export { FootnoteTokenizer, uniqueName as FootnoteTokenizerName, FootnoteTokenizer as default, match as footnoteMatch, parse as footnoteParse };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { match as footnoteMatch } from './match';
|
|
2
|
+
export { parse as footnoteParse } from './parse';
|
|
1
3
|
export { FootnoteTokenizer, FootnoteTokenizer as default } from './tokenizer';
|
|
2
4
|
export { uniqueName as FootnoteTokenizerName } from './types';
|
|
3
|
-
export type { IToken as IFootnoteToken, ITokenizerProps as IFootnoteTokenizerProps } from './types';
|
|
5
|
+
export type { IThis as IFootnoteHookContext, IToken as IFootnoteToken, ITokenizerProps as IFootnoteTokenizerProps, } from './types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IMatchInlineHookCreator } from '@yozora/core-tokenizer';
|
|
2
|
+
import type { IDelimiter, IThis, IToken, T } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* An inline footnote consists of a footnote text followed immediately by a right
|
|
5
|
+
* square bracket ']'.
|
|
6
|
+
*
|
|
7
|
+
* Like the inline links, footnote could not be contained by other footnote.
|
|
8
|
+
*
|
|
9
|
+
* @see https://github.com/syntax-tree/mdast-util-footnote
|
|
10
|
+
* @see https://github.com/remarkjs/remark-footnotes
|
|
11
|
+
* @see https://github.com/syntax-tree/mdast#link
|
|
12
|
+
* @see https://github.github.com/gfm/#links
|
|
13
|
+
* @see https://www.markdownguide.org/extended-syntax/#footnotes
|
|
14
|
+
*/
|
|
15
|
+
export declare const match: IMatchInlineHookCreator<T, IDelimiter, IToken, IThis>;
|
package/lib/types/tokenizer.d.ts
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import type { IInlineTokenizer, IMatchInlineHookCreator, IParseInlineHookCreator } from '@yozora/core-tokenizer';
|
|
2
2
|
import { BaseInlineTokenizer } from '@yozora/core-tokenizer';
|
|
3
|
-
import type { IDelimiter, INode, IToken, ITokenizerProps, T } from './types';
|
|
3
|
+
import type { IDelimiter, INode, IThis, IToken, ITokenizerProps, T } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Lexical Analyzer for inline footnote.
|
|
6
|
-
*
|
|
7
|
-
* An inline footnote consists of a footnote text followed immediately by a right
|
|
8
|
-
* square bracket ']'.
|
|
9
|
-
*
|
|
10
|
-
* Like the inline links, footnote could not be contained by other footnote.
|
|
11
|
-
*
|
|
12
6
|
* @see https://github.com/syntax-tree/mdast-util-footnote
|
|
13
7
|
* @see https://github.com/remarkjs/remark-footnotes
|
|
14
8
|
* @see https://github.com/syntax-tree/mdast#link
|
|
15
9
|
* @see https://github.github.com/gfm/#links
|
|
16
10
|
* @see https://www.markdownguide.org/extended-syntax/#footnotes
|
|
17
11
|
*/
|
|
18
|
-
export declare class FootnoteTokenizer extends BaseInlineTokenizer<T, IDelimiter, IToken, INode> implements IInlineTokenizer<T, IDelimiter, IToken, INode> {
|
|
12
|
+
export declare class FootnoteTokenizer extends BaseInlineTokenizer<T, IDelimiter, IToken, INode, IThis> implements IInlineTokenizer<T, IDelimiter, IToken, INode, IThis> {
|
|
19
13
|
constructor(props?: ITokenizerProps);
|
|
20
|
-
readonly match: IMatchInlineHookCreator<T, IDelimiter, IToken>;
|
|
21
|
-
readonly parse: IParseInlineHookCreator<T, IToken, INode>;
|
|
14
|
+
readonly match: IMatchInlineHookCreator<T, IDelimiter, IToken, IThis>;
|
|
15
|
+
readonly parse: IParseInlineHookCreator<T, IToken, INode, IThis>;
|
|
22
16
|
}
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FootnoteType, IFootnote } from '@yozora/ast';
|
|
2
|
-
import type { IBaseInlineTokenizerProps, IPartialYastInlineToken, IYastTokenDelimiter } from '@yozora/core-tokenizer';
|
|
2
|
+
import type { IBaseInlineTokenizerProps, IPartialYastInlineToken, ITokenizer, IYastTokenDelimiter } from '@yozora/core-tokenizer';
|
|
3
3
|
export declare type T = FootnoteType;
|
|
4
4
|
export declare type INode = IFootnote;
|
|
5
5
|
export declare const uniqueName = "@yozora/tokenizer-footnote";
|
|
@@ -10,4 +10,5 @@ export interface IDelimiter extends IYastTokenDelimiter {
|
|
|
10
10
|
*/
|
|
11
11
|
type: 'opener' | 'closer';
|
|
12
12
|
}
|
|
13
|
+
export declare type IThis = ITokenizer;
|
|
13
14
|
export declare type ITokenizerProps = Partial<IBaseInlineTokenizerProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-footnote",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "guanghechen",
|
|
6
6
|
"url": "https://github.com/guanghechen/"
|
|
@@ -35,10 +35,10 @@
|
|
|
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.0-alpha.
|
|
39
|
-
"@yozora/character": "^2.0.0-alpha.
|
|
40
|
-
"@yozora/core-tokenizer": "^2.0.0-alpha.
|
|
41
|
-
"@yozora/tokenizer-link": "^2.0.0-alpha.
|
|
38
|
+
"@yozora/ast": "^2.0.0-alpha.1",
|
|
39
|
+
"@yozora/character": "^2.0.0-alpha.1",
|
|
40
|
+
"@yozora/core-tokenizer": "^2.0.0-alpha.1",
|
|
41
|
+
"@yozora/tokenizer-link": "^2.0.0-alpha.1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "86202e1d2b03ccfc2ab030517d9d314f7aee7666"
|
|
44
44
|
}
|