@yozora/tokenizer-footnote-definition 2.0.0-alpha.1 → 2.0.0-alpha.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/lib/cjs/index.js +15 -8
- package/lib/esm/index.js +15 -8
- package/package.json +5 -5
package/lib/cjs/index.js
CHANGED
|
@@ -96,14 +96,21 @@ const parse = function (api) {
|
|
|
96
96
|
parse: tokens => tokens.map(token => {
|
|
97
97
|
const label = token._label;
|
|
98
98
|
const identifier = token._identifier;
|
|
99
|
-
const children =
|
|
100
|
-
const node =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
const children = api.parseBlockTokens(token.children);
|
|
100
|
+
const node = api.shouldReservePosition
|
|
101
|
+
? {
|
|
102
|
+
type: ast.FootnoteDefinitionType,
|
|
103
|
+
position: token.position,
|
|
104
|
+
identifier,
|
|
105
|
+
label,
|
|
106
|
+
children,
|
|
107
|
+
}
|
|
108
|
+
: {
|
|
109
|
+
type: ast.FootnoteDefinitionType,
|
|
110
|
+
identifier,
|
|
111
|
+
label,
|
|
112
|
+
children,
|
|
113
|
+
};
|
|
107
114
|
return node;
|
|
108
115
|
}),
|
|
109
116
|
};
|
package/lib/esm/index.js
CHANGED
|
@@ -92,14 +92,21 @@ const parse = function (api) {
|
|
|
92
92
|
parse: tokens => tokens.map(token => {
|
|
93
93
|
const label = token._label;
|
|
94
94
|
const identifier = token._identifier;
|
|
95
|
-
const children =
|
|
96
|
-
const node =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
const children = api.parseBlockTokens(token.children);
|
|
96
|
+
const node = api.shouldReservePosition
|
|
97
|
+
? {
|
|
98
|
+
type: FootnoteDefinitionType,
|
|
99
|
+
position: token.position,
|
|
100
|
+
identifier,
|
|
101
|
+
label,
|
|
102
|
+
children,
|
|
103
|
+
}
|
|
104
|
+
: {
|
|
105
|
+
type: FootnoteDefinitionType,
|
|
106
|
+
identifier,
|
|
107
|
+
label,
|
|
108
|
+
children,
|
|
109
|
+
};
|
|
103
110
|
return node;
|
|
104
111
|
}),
|
|
105
112
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-footnote-definition",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "guanghechen",
|
|
6
6
|
"url": "https://github.com/guanghechen/"
|
|
@@ -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.0-alpha.
|
|
39
|
-
"@yozora/character": "^2.0.0-alpha.
|
|
40
|
-
"@yozora/core-tokenizer": "^2.0.0-alpha.
|
|
38
|
+
"@yozora/ast": "^2.0.0-alpha.2",
|
|
39
|
+
"@yozora/character": "^2.0.0-alpha.2",
|
|
40
|
+
"@yozora/core-tokenizer": "^2.0.0-alpha.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "da59d85520455c59a117a35032ef1a035c10ea21"
|
|
43
43
|
}
|