@yozora/tokenizer-emphasis 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 +8 -8
- package/lib/esm/index.js +8 -8
- package/package.json +5 -5
package/lib/cjs/index.js
CHANGED
|
@@ -140,15 +140,15 @@ const match = function (api) {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
const parse = function () {
|
|
143
|
+
const parse = function (api) {
|
|
144
144
|
return {
|
|
145
|
-
parse: (token
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
children
|
|
149
|
-
|
|
150
|
-
return
|
|
151
|
-
},
|
|
145
|
+
parse: tokens => tokens.map(token => {
|
|
146
|
+
const children = api.parseInlineTokens(token.children);
|
|
147
|
+
const node = api.shouldReservePosition
|
|
148
|
+
? { type: token.nodeType, position: api.calcPosition(token), children }
|
|
149
|
+
: { type: token.nodeType, children };
|
|
150
|
+
return node;
|
|
151
|
+
}),
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
|
package/lib/esm/index.js
CHANGED
|
@@ -136,15 +136,15 @@ const match = function (api) {
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
const parse = function () {
|
|
139
|
+
const parse = function (api) {
|
|
140
140
|
return {
|
|
141
|
-
parse: (token
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
children
|
|
145
|
-
|
|
146
|
-
return
|
|
147
|
-
},
|
|
141
|
+
parse: tokens => tokens.map(token => {
|
|
142
|
+
const children = api.parseInlineTokens(token.children);
|
|
143
|
+
const node = api.shouldReservePosition
|
|
144
|
+
? { type: token.nodeType, position: api.calcPosition(token), children }
|
|
145
|
+
: { type: token.nodeType, children };
|
|
146
|
+
return node;
|
|
147
|
+
}),
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-emphasis",
|
|
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
|
}
|