@yozora/tokenizer-fenced-code 2.1.3 → 2.1.5
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/CHANGELOG.md +711 -0
- package/README.md +42 -42
- package/package.json +7 -7
- package/src/index.ts +0 -9
- package/src/match.ts +0 -19
- package/src/parse.ts +0 -58
- package/src/tokenizer.ts +0 -52
- package/src/types.ts +0 -13
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [2.1.5](https://github.com/yozorajs/yozora/compare/v2.1.4...v2.1.5) (2023-05-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Performance Improvements
|
|
10
|
+
|
|
11
|
+
* 🔧 don't sourcemaps into tarball ([fc37aa8](https://github.com/yozorajs/yozora/commit/fc37aa8847ac4ad78ecb31f198e1cd6a85e91bcf))
|
|
12
|
+
* 📝 update CHANGELOGs ([c51b283](https://github.com/yozorajs/yozora/commit/c51b283874f8a562b6ed9fad46a0b7d578f6eb42))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 2.1.4 (2023-04-02)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Performance Improvements
|
|
22
|
+
|
|
23
|
+
* 🔧 don't pack src/ folder into tarball ([c9fac38](https://github.com/yozorajs/yozora/commit/c9fac382e9a7a8d6454452b0c4d5b57dac16455f))
|
|
24
|
+
* 🔖 publish v2.1.4 ([aa464ed](https://github.com/yozorajs/yozora/commit/aa464ed1e3cd84892773a833910cfc53a556bf5f))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 2.1.3 (2023-03-23)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Performance Improvements
|
|
32
|
+
|
|
33
|
+
* 🔖 publish v2.1.3 ([9abaaff](https://github.com/yozorajs/yozora/commit/9abaaff74a12d0bae0f645813241ff947a0d828c))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## 2.1.2 (2023-03-11)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Performance Improvements
|
|
41
|
+
|
|
42
|
+
* 🔖 publish v2.1.2 ([992baca](https://github.com/yozorajs/yozora/commit/992bacafd173e7788e99fed34ce8b45f6ed24cfe))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 2.1.1 (2023-03-10)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Performance Improvements
|
|
50
|
+
|
|
51
|
+
* 🔖 publish v2.1.1 ([257a36d](https://github.com/yozorajs/yozora/commit/257a36d8dc079d4ac226405c155b238e7099bcea))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## 2.0.6 (2023-03-05)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Performance Improvements
|
|
59
|
+
|
|
60
|
+
* 🔖 publish v2.0.6 ([a263c53](https://github.com/yozorajs/yozora/commit/a263c5338103824347bac74d437051e9fbb6d791))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## 2.0.5 (2023-01-09)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Performance Improvements
|
|
68
|
+
|
|
69
|
+
* 🔖 publish v2.0.5 ([7ba3bab](https://github.com/yozorajs/yozora/commit/7ba3bab49fe65cf2f57082c0503af73da9356cf0))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## 2.0.5-alpha.0 (2023-01-05)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Performance Improvements
|
|
77
|
+
|
|
78
|
+
* 🔧 fix test configuration ([f50b2d7](https://github.com/yozorajs/yozora/commit/f50b2d7600139e0ea54e042b025365d81f4518b5))
|
|
79
|
+
* 🔖 publish v2.0.5-alpha.0 ([8bf941f](https://github.com/yozorajs/yozora/commit/8bf941fe4ef82947165b0f3cc123cd493665e13b))
|
|
80
|
+
* 🔧 update package entries ([2c94f27](https://github.com/yozorajs/yozora/commit/2c94f27ffb645119a863f2ceee68a6b1b7285a67))
|
|
81
|
+
* ⬆️ upgrade devDependencies ([13059a9](https://github.com/yozorajs/yozora/commit/13059a924f3ae3b7fd69080ec9e82cde34a0f097))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## 2.0.4 (2022-11-02)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Performance Improvements
|
|
89
|
+
|
|
90
|
+
* 🔖 publish v2.0.4 ([c980b95](https://github.com/yozorajs/yozora/commit/c980b95254394dcacba0cbb4bea251350b09397c))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 2.0.3 (2022-10-11)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Performance Improvements
|
|
98
|
+
|
|
99
|
+
* 🔖 publish v2.0.3 ([8cc8f95](https://github.com/yozorajs/yozora/commit/8cc8f95cfebc8d752bc3272cdd24965f540c130b))
|
|
100
|
+
* 🔧 update build script ([d934cad](https://github.com/yozorajs/yozora/commit/d934cad21a4ab763621ca6a72379cd4294caa605))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## 2.0.2 (2022-09-24)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Performance Improvements
|
|
108
|
+
|
|
109
|
+
* 📝 fix invalid links ([eb304c9](https://github.com/yozorajs/yozora/commit/eb304c931b2e682cf156bbceae0a20655777381e))
|
|
110
|
+
* 🔖 publish v2.0.2 ([6911295](https://github.com/yozorajs/yozora/commit/6911295e9eacfa29563fe93494704190e50625fd))
|
|
111
|
+
* 🔧 support node@16.x.x ([eda301f](https://github.com/yozorajs/yozora/commit/eda301fe1047e380de5be915ae730206a026f07b))
|
|
112
|
+
* 📝 update links ([4467fe6](https://github.com/yozorajs/yozora/commit/4467fe646e0a95fcc7206658189884f68872bc4e))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## 2.0.2-alpha.0 (2022-05-22)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Performance Improvements
|
|
120
|
+
|
|
121
|
+
* 🔖 publish v2.0.2-alpha.0 ([430eaab](https://github.com/yozorajs/yozora/commit/430eaabd83f4a1ee29398ee1798aa4511976c38f))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
## 2.0.1 (2022-05-21)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### Features
|
|
129
|
+
|
|
130
|
+
* 🎨 set 'lang' and 'meta' to null if it is empty & add tainling line ending ([5d1aa19](https://github.com/yozorajs/yozora/commit/5d1aa193b1ff0e9782f661e1ba6e759334a1f31a))
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Performance Improvements
|
|
134
|
+
|
|
135
|
+
* ✅ refactor test utils & rename createTester to createTokenizerTester ([7f2ce75](https://github.com/yozorajs/yozora/commit/7f2ce7571a336370d419aa01073bf8054783cfd9))
|
|
136
|
+
* 🔖 publish v2.0.1 ([3aea330](https://github.com/yozorajs/yozora/commit/3aea33091e402bd6c7754d91d549e8d648475073))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
# 2.0.0 (2022-01-15)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
### Performance Improvements
|
|
144
|
+
|
|
145
|
+
* 🔖 publish v2.0.0 ([65e99d1](https://github.com/yozorajs/yozora/commit/65e99d1709fdd1c918465dce6b1e91de96bdab5e))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# 2.0.0-alpha.3 (2022-01-12)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Features
|
|
153
|
+
|
|
154
|
+
* 💥 [breaking] remove 'I' prefix for AST node types ([cad4b0b](https://github.com/yozorajs/yozora/commit/cad4b0b5b8061ea495f6455ef1554bb3c8f223a0))
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Performance Improvements
|
|
158
|
+
|
|
159
|
+
* 🔖 publish v2.0.0-alpha.3 ([9f274fc](https://github.com/yozorajs/yozora/commit/9f274fc7487a8c1dd213405d92508f9a7621f730))
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
# 2.0.0-alpha.2 (2022-01-09)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
### Performance Improvements
|
|
167
|
+
|
|
168
|
+
* 🎨 refactor removePosition ([87a974f](https://github.com/yozorajs/yozora/commit/87a974fd744ae937d5778d3cdba4b345141bcaf6))
|
|
169
|
+
* 🔖 publish v2.0.0-alpha.2 ([da59d85](https://github.com/yozorajs/yozora/commit/da59d85520455c59a117a35032ef1a035c10ea21))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
# 2.0.0-alpha.1 (2022-01-08)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### Bug Fixes
|
|
177
|
+
|
|
178
|
+
* 🐛 fix incorrect export names ([b2d1fa7](https://github.com/yozorajs/yozora/commit/b2d1fa71d774bd78c87aa51435ba89593ebbeb24))
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### Features
|
|
182
|
+
|
|
183
|
+
* :breaking: refactor parse-block hooks ([117104d](https://github.com/yozorajs/yozora/commit/117104de9668a0d160e9e008ee6305811e83aec6))
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
### Performance Improvements
|
|
187
|
+
|
|
188
|
+
* 🔖 publish v2.0.0-alpha.1 ([86202e1](https://github.com/yozorajs/yozora/commit/86202e1d2b03ccfc2ab030517d9d314f7aee7666))
|
|
189
|
+
* 🎨 rename IHookContext to IThis ([04d5470](https://github.com/yozorajs/yozora/commit/04d5470c9949c4acfe6239289d34a8b5c6191e71))
|
|
190
|
+
* 📝 update READMEs ([320afeb](https://github.com/yozorajs/yozora/commit/320afebd6c500cbbce5fd65c1cd184bbd2224f25))
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
# 2.0.0-alpha.0 (2022-01-03)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Bug Fixes
|
|
198
|
+
|
|
199
|
+
* 🐛 footnoteDefinition should be containing blocks, but fencedCode shouldn't be ([51c9133](https://github.com/yozorajs/yozora/commit/51c913361761b36ff54ef0ae49e549e3305bb789))
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### Features
|
|
203
|
+
|
|
204
|
+
* 💥 [breaking] rename types with 'I' prefix ([d37d862](https://github.com/yozorajs/yozora/commit/d37d862212831dbe75ac92a6dbdadf2fa81cce8c))
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
### Performance Improvements
|
|
208
|
+
|
|
209
|
+
* 💥 refactor block tokenizers ([50ea4da](https://github.com/yozorajs/yozora/commit/50ea4dac5be8d7dd3d6eccf7e0ce1cfe05fe704a))
|
|
210
|
+
* 🔖 publish v2.0.0-alpha.0 ([0171501](https://github.com/yozorajs/yozora/commit/0171501339c49ffd02ed16a63447fa20a47a29a7))
|
|
211
|
+
* 🎨 rename parser hooks ([ef6cbc5](https://github.com/yozorajs/yozora/commit/ef6cbc51323e6ef9d4cd78f1c7194ae1f7819245))
|
|
212
|
+
* 🎨 set print width to 100 ([657a621](https://github.com/yozorajs/yozora/commit/657a6211cad52d5f1b183e7bcd7ea227b2aa7724))
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
# 1.3.0 (2021-10-09)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
### Performance Improvements
|
|
220
|
+
|
|
221
|
+
* 🔖 publish v1.3.0 ([18c9b16](https://github.com/yozorajs/yozora/commit/18c9b167004ad97718b2f94f25139f80598cbf7a))
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## 1.2.2 (2021-09-06)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### Performance Improvements
|
|
229
|
+
|
|
230
|
+
* 🔖 publish v1.2.2 ([fb4b804](https://github.com/yozorajs/yozora/commit/fb4b804548592c09259aabcf9cc4dd96176bd024))
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## 1.2.1 (2021-09-04)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Performance Improvements
|
|
238
|
+
|
|
239
|
+
* 🔖 publish v1.2.1 ([d98d07d](https://github.com/yozorajs/yozora/commit/d98d07d7c56dd9f6bb60149b2b0a4be2787e1046))
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
# 1.2.0 (2021-08-22)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### Performance Improvements
|
|
247
|
+
|
|
248
|
+
* 🔖 publish v1.2.0 ([86da40e](https://github.com/yozorajs/yozora/commit/86da40e50d2fe9acace68695288e15e012e6cd0d))
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
# 1.2.0-alpha.1 (2021-08-16)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
### Performance Improvements
|
|
256
|
+
|
|
257
|
+
* 🔖 publish v1.2.0-alpha.1 ([ce3c173](https://github.com/yozorajs/yozora/commit/ce3c17330085f22404668a388f2bee6f57e6e958))
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
# 1.2.0-alpha.0 (2021-08-15)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
### Performance Improvements
|
|
265
|
+
|
|
266
|
+
* 🔖 publish v1.2.0-alpha.0 ([bd8ef45](https://github.com/yozorajs/yozora/commit/bd8ef455a22963834a70339f42178138aab28df6))
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
# 1.1.0 (2021-08-12)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
### Performance Improvements
|
|
274
|
+
|
|
275
|
+
* 🔖 publish v1.1.0 ([a8c7cff](https://github.com/yozorajs/yozora/commit/a8c7cffcbdc36930ab3c744450c8feb4395a9fac))
|
|
276
|
+
* 📝 update related references ([e2c8c7e](https://github.com/yozorajs/yozora/commit/e2c8c7e6ff8c5c1da27ca224d5c5d0eb4e5fbca7))
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# 1.1.0-alpha.2 (2021-08-07)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
### Performance Improvements
|
|
284
|
+
|
|
285
|
+
* 🔖 publish v1.1.0-alpha.2 ([d88b8ec](https://github.com/yozorajs/yozora/commit/d88b8eca03118b9f2a8b00ac4106ea82e779bc94))
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
# 1.1.0-alpha.1 (2021-08-01)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
### Performance Improvements
|
|
293
|
+
|
|
294
|
+
* 🔖 publish v1.1.0-alpha.1 ([0d6aa91](https://github.com/yozorajs/yozora/commit/0d6aa91fb5a15b962b016496453dbfa7f1197126))
|
|
295
|
+
* 📝 update READMEs ([738d626](https://github.com/yozorajs/yozora/commit/738d626d76c535ea017812f674b43842ee073227))
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
# 1.1.0-alpha.0 (2021-07-31)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
### Performance Improvements
|
|
303
|
+
|
|
304
|
+
* 🔖 publish v1.1.0-alpha.0 ([082653e](https://github.com/yozorajs/yozora/commit/082653e421889513588492774503d8ddcc24b8f9))
|
|
305
|
+
* 📝 update READMEs ([9905f04](https://github.com/yozorajs/yozora/commit/9905f0408b15d4478d021ef5c75497817f2db9a3))
|
|
306
|
+
* 📝 update READMEs ([03fe64c](https://github.com/yozorajs/yozora/commit/03fe64c6a9eab9bf810d4648261e7a808a13d1e1))
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
# 1.0.0 (2021-07-20)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
### Performance Improvements
|
|
314
|
+
|
|
315
|
+
* 🔖 publish v1.0.0 ([ad754e3](https://github.com/yozorajs/yozora/commit/ad754e3a5945cd2ce19d9e6bfa59cb82caf0c7ac))
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
# 1.0.0-beta.0 (2021-07-08)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
### Performance Improvements
|
|
323
|
+
|
|
324
|
+
* 🔖 publish v1.0.0-beta.0 ([bb66320](https://github.com/yozorajs/yozora/commit/bb6632098367cd8cf391eb1380d4542c15383bac))
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
# 1.0.0-1.0.0-beta.0.0 (2021-07-08)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
### Performance Improvements
|
|
332
|
+
|
|
333
|
+
* 🔖 publish v1.0.0-1.0.0-beta.0.0 ([4051dd2](https://github.com/yozorajs/yozora/commit/4051dd2bcdea0d051141abaa85635e52d84c04f2))
|
|
334
|
+
* ⚡️ remove unnecessary codes ([cebe92a](https://github.com/yozorajs/yozora/commit/cebe92a3375d1d49054d332764f2490d4bb92c53))
|
|
335
|
+
* 📝 update READMEs ([9d9f940](https://github.com/yozorajs/yozora/commit/9d9f940a81188502db6045134054b18b747819bf))
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
# 1.0.0-alpha.29 (2021-07-08)
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
### Performance Improvements
|
|
343
|
+
|
|
344
|
+
* expose new utility func 'createTester' and 'createTesters' ([a4e9613](https://github.com/yozorajs/yozora/commit/a4e9613063e3e5840cf066e6e7343dbd5ffd4884))
|
|
345
|
+
* 📝 fix invalid link references ([f7b97b3](https://github.com/yozorajs/yozora/commit/f7b97b3dc74f065aa8f00ecd846ee4fa7f704453))
|
|
346
|
+
* 🔖 publish v1.0.0-alpha.29 ([f2291db](https://github.com/yozorajs/yozora/commit/f2291db2812043dd6586eaabd14e427abb11663a))
|
|
347
|
+
* 🎨 use path alias in tests ([29cca94](https://github.com/yozorajs/yozora/commit/29cca943d4fbc6d26af4507d3fa75ac08dcf388a))
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
# 1.0.0-alpha.28 (2021-06-30)
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
### Performance Improvements
|
|
355
|
+
|
|
356
|
+
* 🔖 publish v1.0.0-alpha.28 ([f18d90a](https://github.com/yozorajs/yozora/commit/f18d90a116db508bf49c9a3338a262cb85faf792))
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
# 1.0.0-alpha.27 (2021-06-28)
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
### Performance Improvements
|
|
364
|
+
|
|
365
|
+
* 🎨 update base abstract tokenizer ([cca9dd6](https://github.com/yozorajs/yozora/commit/cca9dd6fc3d4a22e1352378f59c7d2dccecfc5a2))
|
|
366
|
+
* 🔖 publish v1.0.0-alpha.27 ([8efea07](https://github.com/yozorajs/yozora/commit/8efea07b2314c241c91fc113abdc8852f216c9d7))
|
|
367
|
+
* ⬆️ upgrade dev dependencies ([d126ff4](https://github.com/yozorajs/yozora/commit/d126ff4c81ec09b366a0c60ba2a83e7f45fbe317))
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
# 1.0.0-alpha.26 (2021-06-25)
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
### Performance Improvements
|
|
375
|
+
|
|
376
|
+
* 🔖 publish v1.0.0-alpha.26 ([cbde29c](https://github.com/yozorajs/yozora/commit/cbde29c6188c9183f0b39ccfac0ad310803b09fe))
|
|
377
|
+
* 📝 update READMEs ([11e4f61](https://github.com/yozorajs/yozora/commit/11e4f6107c3862bf8c81dae882e93cab3f56f40f))
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
# 1.0.0-alpha.25 (2021-06-17)
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
### Performance Improvements
|
|
385
|
+
|
|
386
|
+
* 🔖 publish v1.0.0-alpha.25 ([5e17f71](https://github.com/yozorajs/yozora/commit/5e17f7155391c21eb1c99e5024e48d5e208e80db))
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
# 1.0.0-alpha.24 (2021-06-10)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
### Performance Improvements
|
|
394
|
+
|
|
395
|
+
* 🔖 publish v1.0.0-alpha.24 ([6169f8e](https://github.com/yozorajs/yozora/commit/6169f8ecda42e04203e4533f820e82ea3e93b7dd))
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
# 1.0.0-alpha.23 (2021-06-08)
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
### Performance Improvements
|
|
403
|
+
|
|
404
|
+
* Move repository from github.com/guanghechen to github.com/yozorajs ([c1fd32c](https://github.com/yozorajs/yozora/commit/c1fd32ce818b44aa0d993ec8f74ef514bdf2d834))
|
|
405
|
+
* 🔖 publish v1.0.0-alpha.23 ([131a216](https://github.com/yozorajs/yozora/commit/131a2162b64eb23f98e93286974f4a3e4a91b77a))
|
|
406
|
+
* 📝 update READMEs ([6420941](https://github.com/yozorajs/yozora/commit/64209414cacdaf0e04329e2c86e6ff41f885f55f))
|
|
407
|
+
* ⬆️ upgrade dependencies ([c153266](https://github.com/yozorajs/yozora/commit/c15326650ec6402300891ce2d8eb1241f60c0004))
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
# 1.0.0-alpha.22 (2021-05-20)
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
### Performance Improvements
|
|
415
|
+
|
|
416
|
+
* 🔖 publish v1.0.0-alpha.22 ([a07a41d](https://github.com/yozorajs/yozora/commit/a07a41de8dda2ff579b0e5b469db75d6c629c38b))
|
|
417
|
+
* 🔧 rename the main branch to 'main' instead of 'master' ([c915653](https://github.com/yozorajs/yozora/commit/c9156537fba68ce073e139eb487afb973b7d90ba))
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
# 1.0.0-alpha.21 (2021-05-12)
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
### Performance Improvements
|
|
425
|
+
|
|
426
|
+
* 🔖 publish v1.0.0-alpha.21 ([e6655a2](https://github.com/yozorajs/yozora/commit/e6655a252c0b799d0990f06bc7cfdadc6824b63c))
|
|
427
|
+
* ⬆️ upgrade typescript to v4.3 for using the new keyword `override` ([41de293](https://github.com/yozorajs/yozora/commit/41de293c85c7190466f5ece7a8e0793e35309407))
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
# 1.0.0-alpha.20 (2021-04-20)
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
### Performance Improvements
|
|
435
|
+
|
|
436
|
+
* 🔖 publish v1.0.0-alpha.20 ([3f3831f](https://github.com/yozorajs/yozora/commit/3f3831fb6fdb72319e7d24a1ba4b51b44bdb4c8d))
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
# 1.0.0-alpha.19 (2021-04-19)
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
### Performance Improvements
|
|
444
|
+
|
|
445
|
+
* 🔖 publish v1.0.0-alpha.19 ([50b55f9](https://github.com/yozorajs/yozora/commit/50b55f9e5fd1d00c03d271a488d2a648ccd0a1d1))
|
|
446
|
+
* 📝 update READMEs ([907af97](https://github.com/yozorajs/yozora/commit/907af97f8c0bca5b045ccae188c6b759e88ec38c))
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
# 1.0.0-alpha.18 (2021-04-18)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
### Performance Improvements
|
|
454
|
+
|
|
455
|
+
* 🔖 publish v1.0.0-alpha.18 ([219b28b](https://github.com/yozorajs/yozora/commit/219b28b38975d6d41f6c285a512a5c0dccceb6fa))
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
# 1.0.0-alpha.17 (2021-04-15)
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
### Performance Improvements
|
|
463
|
+
|
|
464
|
+
* 🔖 publish v1.0.0-alpha.17 ([0e7facd](https://github.com/yozorajs/yozora/commit/0e7facdde8692e538e5777d70b873cf6282f7de8))
|
|
465
|
+
* 📝 update docs ([acffd75](https://github.com/yozorajs/yozora/commit/acffd757123705c4d0f6a3948f62f3c460cefde3))
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
# 1.0.0-alpha.16 (2021-04-12)
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
### Performance Improvements
|
|
473
|
+
|
|
474
|
+
* ✅ collect all test cases in the scaffolds/jest-for-tokenizer/fixtures/ directory ([a328ffd](https://github.com/yozorajs/yozora/commit/a328ffd8c11d8e49ec6cc378057b01448ed09300))
|
|
475
|
+
* 🔖 publish v1.0.0-alpha.16 ([9da34dd](https://github.com/yozorajs/yozora/commit/9da34dd46333b72f908c77d15f11326f3724060c))
|
|
476
|
+
* ✅ simplify test codes ([60d072c](https://github.com/yozorajs/yozora/commit/60d072c6bf4a414e45b3d98713223a23be5d0bb8))
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
# 1.0.0-alpha.15 (2021-04-11)
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
### Performance Improvements
|
|
484
|
+
|
|
485
|
+
* 🔖 publish v1.0.0-alpha.15 ([988d25f](https://github.com/yozorajs/yozora/commit/988d25f7958825ccbaaa99051ad7b823c625d4cf))
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
# 1.0.0-alpha.14 (2021-04-11)
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
### Performance Improvements
|
|
493
|
+
|
|
494
|
+
* 🔖 publish v1.0.0-alpha.14 ([3fcfffa](https://github.com/yozorajs/yozora/commit/3fcfffa0da0413449acf0d91d85400d0b31fa9a2))
|
|
495
|
+
* 🎨 rename isContainerBlock to isContainingBlock & use enum TokenizerPriority instead of magic numbers to present tokenizer proirity ([940c50b](https://github.com/yozorajs/yozora/commit/940c50bb58b76a888a512539f3a4db6e8396d45b))
|
|
496
|
+
* ✅ update tests ([3c9f64f](https://github.com/yozorajs/yozora/commit/3c9f64f331d2b2c3484cc580dc8ef13e21ee42b8))
|
|
497
|
+
* ✅ update tests ([a24d148](https://github.com/yozorajs/yozora/commit/a24d1485b59caaeff4510b1150d8810236a9906a))
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
# 1.0.0-alpha.13 (2021-04-10)
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
### Performance Improvements
|
|
505
|
+
|
|
506
|
+
* :art: [tokenizer-fenced-code] improve: use @yozora/tokenizer-fenced-block to simplify the code ([a88861c](https://github.com/yozorajs/yozora/commit/a88861cc0f598ef92d6265d1a8fed30b47537d74))
|
|
507
|
+
* 🔖 publish v1.0.0-alpha.13 ([949455c](https://github.com/yozorajs/yozora/commit/949455c25f4fb60a88c3484829a610da7c998969))
|
|
508
|
+
* 💥 remove parse-meta phase (calc meta such as definitions after parse-block). ([463e751](https://github.com/yozorajs/yozora/commit/463e75126448b672dc15019e8dd93d9d64bc9b5e))
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
# 1.0.0-alpha.12 (2021-03-27)
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
### Features
|
|
516
|
+
|
|
517
|
+
* 💥 redesign interfaces & refactor tokenizer codes with types from @yozora/ast ([af3603d](https://github.com/yozorajs/yozora/commit/af3603d771bde94ec0c78fb53aa6d64a14933f9d))
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
### Performance Improvements
|
|
521
|
+
|
|
522
|
+
* 🎨 make '_tokenizer' optional in the result of tokenizers on match phase ([b1ea8de](https://github.com/yozorajs/yozora/commit/b1ea8de5a439615d09e9cc3585b1a3cbdb663d31))
|
|
523
|
+
* 🔧 update script fields ([48a57ec](https://github.com/yozorajs/yozora/commit/48a57ec8f92b5cffb02e24b0b2ee94364033226f))
|
|
524
|
+
* 🔖 publish v1.0.0-alpha.12 ([897f131](https://github.com/yozorajs/yozora/commit/897f1317408ab43406788d5b796d245fd4eeac13))
|
|
525
|
+
* ✅ update tests (RootMeta changed) ([75e7693](https://github.com/yozorajs/yozora/commit/75e769306d9ebdde0e878cfda571aec856cf4d30))
|
|
526
|
+
* ✅ update tests due to the previous changes ([24bb714](https://github.com/yozorajs/yozora/commit/24bb714196ed762db2a08ca893ef13d06b331284))
|
|
527
|
+
* 🎨 use AST types from @yozora/ast instead of @yozora/core-tokenizer ([fc55ceb](https://github.com/yozorajs/yozora/commit/fc55cebca8162a111fca1c0cdfbf0982831db66a))
|
|
528
|
+
* 🎨 use types defined in @yozora/ast & use tokenizerName as unique id of token ([d51f022](https://github.com/yozorajs/yozora/commit/d51f0222a829ef0caea5f1ec058ca3f3553c156d))
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
# 1.0.0-alpha.11 (2021-03-20)
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
### Performance Improvements
|
|
536
|
+
|
|
537
|
+
* 🔖 publish v1.0.0-alpha.11 ([df10f73](https://github.com/yozorajs/yozora/commit/df10f73cbcc698d44cd7f7efbab2f7cac66f8675))
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
# 1.0.0-alpha.10 (2021-03-20)
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
### Performance Improvements
|
|
545
|
+
|
|
546
|
+
* 🔖 publish v1.0.0-alpha.10 ([dbd0114](https://github.com/yozorajs/yozora/commit/dbd0114cd72fa029e743db5d38e10bc1af23ca33))
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
# 1.0.0-alpha.9 (2021-03-20)
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
### Features
|
|
554
|
+
|
|
555
|
+
* 💥 update types of Definition to make it consistent with the Definition in Mdast ([1309771](https://github.com/yozorajs/yozora/commit/1309771175f24c39525f83cc5a0d08f6960ff7c1))
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
### Performance Improvements
|
|
559
|
+
|
|
560
|
+
* 📝 fix invalid badge urls ([4d78b23](https://github.com/yozorajs/yozora/commit/4d78b23b2aa8ae65adb9e86ccd51e372a916f20b))
|
|
561
|
+
* 🔖 publish v1.0.0-alpha.9 ([1b41b56](https://github.com/yozorajs/yozora/commit/1b41b56362c328af28fde43a0b95fa02aff0dfbe))
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
# 1.0.0-alpha.8 (2021-03-13)
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
### Performance Improvements
|
|
569
|
+
|
|
570
|
+
* 🔖 publish v1.0.0-alpha.8 ([3cb3080](https://github.com/yozorajs/yozora/commit/3cb3080312048001d73911a892c4a7c69459c260))
|
|
571
|
+
* 📝 update badges ([418e221](https://github.com/yozorajs/yozora/commit/418e2216ed80c71445f9e0efd9ea054208b18c78))
|
|
572
|
+
* 🔧 update package.json ([cba99c5](https://github.com/yozorajs/yozora/commit/cba99c5aa58de54672cc292e587914f56d702f7a))
|
|
573
|
+
* 📝 update READMEs ([188b30b](https://github.com/yozorajs/yozora/commit/188b30ba3f10096722e999452f84752ec3dd459a))
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
# 1.0.0-alpha.7 (2021-03-06)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
### Performance Improvements
|
|
581
|
+
|
|
582
|
+
* 🎨 format codes ([1fbd596](https://github.com/yozorajs/yozora/commit/1fbd59671965b747a990d2bff77de0872f18836d))
|
|
583
|
+
* 🔧 add directory in repository field ([8daefc9](https://github.com/yozorajs/yozora/commit/8daefc94f4999aa471e2edc82728120ae9c0f079))
|
|
584
|
+
* 📝 update badges ([967819b](https://github.com/yozorajs/yozora/commit/967819be94f17a635169fabd48468747e53f2b84))
|
|
585
|
+
* 🔖 publish v1.0.0-alpha.7 ([115ce36](https://github.com/yozorajs/yozora/commit/115ce36207dc675c7a13275c6bf2fccafdb47ffc))
|
|
586
|
+
* 🔧 update scripts field ([72841c5](https://github.com/yozorajs/yozora/commit/72841c571882cb600706aaab1a335fa68013167c))
|
|
587
|
+
* 🔧 use @guanghechen/rollup-config instead of @barusu/rollup-config ([6228c33](https://github.com/yozorajs/yozora/commit/6228c330ed6dc3113c671f56feaa91d47bff6d64))
|
|
588
|
+
* 🔨 use top level rollup.config.js ([818c59b](https://github.com/yozorajs/yozora/commit/818c59b6f5ef3c29f718428c620ebce08f24b9d6))
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
# 1.0.0-alpha.6 (2021-02-25)
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
### Performance Improvements
|
|
596
|
+
|
|
597
|
+
* 🎨 format codes through 'yarn sort-imports' ([a932fec](https://github.com/yozorajs/yozora/commit/a932fec827b51397f2c5378afff11d4efd09159e))
|
|
598
|
+
* 🎨 format codes with prettier ([04582c8](https://github.com/yozorajs/yozora/commit/04582c840608a6d36270066a1e5d552840855118))
|
|
599
|
+
* 🔖 publish v1.0.0-alpha.6 ([e4f20f7](https://github.com/yozorajs/yozora/commit/e4f20f785dc3928c0c928d0d38665bf3609481a6))
|
|
600
|
+
* 🚚 rename @yozora/parser-core to @yozora/core-parser ([e94956f](https://github.com/yozorajs/yozora/commit/e94956f58ccf64f37c476c953679578b3b4b7c24))
|
|
601
|
+
* ⬆️ upgrade @barusu/* to v0.0.47 & upgrade rollup to v2.39.1 ([173b431](https://github.com/yozorajs/yozora/commit/173b431d4522a90b964b11d015ce24eba4028deb))
|
|
602
|
+
* 🔧 upgrade barusu to v0.0.46 ([7c360a4](https://github.com/yozorajs/yozora/commit/7c360a46a6c188e13512ac814a8f59169f41f23d))
|
|
603
|
+
* 🔧 upgrade eslint & update eslint configs & lint codes ([4227453](https://github.com/yozorajs/yozora/commit/4227453ce46a4c9e9e1eeac2939c6365af78c696))
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
# 1.0.0-alpha.5 (2021-02-23)
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
### Performance Improvements
|
|
611
|
+
|
|
612
|
+
* 🔖 publish v1.0.0-alpha.5 ([fa285da](https://github.com/yozorajs/yozora/commit/fa285da950e21abf2505f51256bb12e3b8307823))
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
# 1.0.0-alpha.4 (2021-02-23)
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
### Performance Improvements
|
|
620
|
+
|
|
621
|
+
* :art: merge @yozora/tokenizercore-inline and @yozora/tokenizercore-block into @yozora/tokenizercore ([7583266](https://github.com/yozorajs/yozora/commit/7583266e831d441b0c5004b7ef05cf7008c8f8da))
|
|
622
|
+
* 🎨 rename `parse()` to `parseBlock()` of TokenizerParseBlockHook ([9beb9ee](https://github.com/yozorajs/yozora/commit/9beb9ee14945ecd2d04dfc85ae98eff9de0a4e56))
|
|
623
|
+
* 🎨 move property `recongnizedTypes` from TokenizerParseBlockHook and TokenizerParseInlineHook into the Tokenizer ([d3ec789](https://github.com/yozorajs/yozora/commit/d3ec78944df57a2e8515019bf80eb9c6e508a2ac))
|
|
624
|
+
* 🔖 publish v1.0.0-alpha.4 ([1cfd290](https://github.com/yozorajs/yozora/commit/1cfd29055684e41eb0859d81210a2b542424ffab))
|
|
625
|
+
* 🎨 rename tokenizer hooks ([9f0679f](https://github.com/yozorajs/yozora/commit/9f0679f829efd685b179cf6717cc85a10c004c52))
|
|
626
|
+
* 🔧 update jest config ([2142751](https://github.com/yozorajs/yozora/commit/2142751fee35f8bce093e3b884902e53fa56f072))
|
|
627
|
+
* 📝 update README ([57663fd](https://github.com/yozorajs/yozora/commit/57663fdd46cb57de41feddb461caafed9e54bc07))
|
|
628
|
+
* 📝 update READMEs ([c421f5c](https://github.com/yozorajs/yozora/commit/c421f5c5e21bfd176a5b8b2b7716c4c8326fffcf))
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
# 1.0.0-alpha.3 (2021-02-18)
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
### Performance Improvements
|
|
636
|
+
|
|
637
|
+
* 🔖 publish v1.0.0-alpha.3 ([ba9b6dd](https://github.com/yozorajs/yozora/commit/ba9b6dd2d3bb70a22be8e4bdc1b1c5a8d07bdbe0))
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
# 1.0.0-alpha.2 (2021-02-15)
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
### Performance Improvements
|
|
645
|
+
|
|
646
|
+
* 🔖 publish v1.0.0-alpha.2 ([d1ed70b](https://github.com/yozorajs/yozora/commit/d1ed70bc4f3728049ba285c70a1cd15d6c095597))
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
# 1.0.0-alpha.1 (2021-02-15)
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
### Performance Improvements
|
|
654
|
+
|
|
655
|
+
* 🎨 format codes & update comments ([7873786](https://github.com/yozorajs/yozora/commit/787378606e5536742655602a1e1ca00f874e931f))
|
|
656
|
+
* 🔖 publish v1.0.0-alpha.1 ([def33f1](https://github.com/yozorajs/yozora/commit/def33f19b215c17686a2a270f95329aac3d9d2ce))
|
|
657
|
+
* 📝 update homepage url ([8833f53](https://github.com/yozorajs/yozora/commit/8833f53122bc845f8a359e0192e9443e35fc2808))
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
# 1.0.0-alpha.0 (2021-02-14)
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
### Bug Fixes
|
|
665
|
+
|
|
666
|
+
* 🐛 fix path error caused by the previous move operation ([3fb8564](https://github.com/yozorajs/yozora/commit/3fb856499abc6bcd4db1e2da676c8005a77eb264))
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
### Features
|
|
670
|
+
|
|
671
|
+
* 🚧 remove 'priority' from block tokenizers ([2af6114](https://github.com/yozorajs/yozora/commit/2af611472f381e9c71493e7e0cbda104386207b2))
|
|
672
|
+
* 🚧 handle backslash escapes & update tests ([2a91c56](https://github.com/yozorajs/yozora/commit/2a91c565cac2ae00f9c4dbea5320df020953ed41))
|
|
673
|
+
* 🚧 handle tabs & update tests ([27d198b](https://github.com/yozorajs/yozora/commit/27d198b092be46e7822239d987c707829e432333))
|
|
674
|
+
* 🚧 update due to the change of @yozora/tokenizercore and @yozora/tokenizercore-block ([84e7096](https://github.com/yozorajs/yozora/commit/84e7096d3301ae5f5fc16cec25b2fe584b2368d6))
|
|
675
|
+
* 👽️ update due to the change of @yozora/tokenizercore* ([4208ea9](https://github.com/yozorajs/yozora/commit/4208ea95daa1fc13a07b0afa68be20ba560ff81a))
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
### Performance Improvements
|
|
679
|
+
|
|
680
|
+
* :construction: [template-tokenizer] feat: update boilerplates & format codes ([854a7ca](https://github.com/yozorajs/yozora/commit/854a7ca20ac3b5c8904dcfce1d3e976bad61b536))
|
|
681
|
+
* :art: [tokenizercore-block] improve: update types ([68857d0](https://github.com/yozorajs/yozora/commit/68857d012d8fe1cafe119ac43ee2994a44c3e51d))
|
|
682
|
+
* :art: [tokenizercore-block] improve: reorgnize interface types between tokenizer hooks ([76d889a](https://github.com/yozorajs/yozora/commit/76d889aa5d351a44204318f295f567539ffd058e))
|
|
683
|
+
* :construction: [BREAKING] feat: update tokenizer types from constant case to camel case ([2a99460](https://github.com/yozorajs/yozora/commit/2a99460b29b9bce919b254285ecacd182f945ea0))
|
|
684
|
+
* :white_check_mark: [tokenizer-fenced-code] test: improve codes & udpate tests ([8fab2a2](https://github.com/yozorajs/yozora/commit/8fab2a2e57c7950045107535d7cc3a2ef820d73a))
|
|
685
|
+
* :construction: [tokenizercore-block] feat: update DefaultBlockContext (fix errors and export new methods) and types & refactor @yozora/tokenizer-setext-heading ([2e64759](https://github.com/yozorajs/yozora/commit/2e647597acb0c5768b7dcdb82801baa0d025f7bb))
|
|
686
|
+
* :art: [tokenizercore-block] refactor: move extractPhrasingContentCMS and buildFromPhrasingContentCMS from BlockTokenizer to BlockTokenizerMatchPhaseHook ([01b7ea5](https://github.com/yozorajs/yozora/commit/01b7ea53545c150253e1eb252e8e09abb40ee50b))
|
|
687
|
+
* :construction: [fenced-code] improve: update due to the change of @yozora/tokenizercore-block ([7b6125a](https://github.com/yozorajs/yozora/commit/7b6125a5d1f231d3f057d1b354550894432ac2bf))
|
|
688
|
+
* ✅ add ast positions ([a4a55bb](https://github.com/yozorajs/yozora/commit/a4a55bb9297fb587b80c206508ee57f1c0ff7569))
|
|
689
|
+
* 🎨 improve the messy logic of handling eatContinuationText return values & fix logic errors on processing step2 ([bbce63a](https://github.com/yozorajs/yozora/commit/bbce63a72068a5269d9db28e31f917f98f807f51))
|
|
690
|
+
* 🎨 update PhrasingContentLine to postpone the nodePoint collection operation to the parse-phase stage ([7f62c66](https://github.com/yozorajs/yozora/commit/7f62c66fc5fe4f99172b73f8c11d995c6531abac))
|
|
691
|
+
* ✅ just convert the phrasingContent.contents to string instead of inline nodes in tests ([03d127f](https://github.com/yozorajs/yozora/commit/03d127f6159a56eeae5a1a6e8ada20c2d91754ab))
|
|
692
|
+
* 🎨 update character enums & rename utility funcs ([aef44cc](https://github.com/yozorajs/yozora/commit/aef44cce880b5bbefbaee574229e182af8891246))
|
|
693
|
+
* 🔨 fix path error ([9b7780f](https://github.com/yozorajs/yozora/commit/9b7780fa9d919ac0f6d35641e3f3995a703d79f9))
|
|
694
|
+
* 🎨 format codes ([ae32884](https://github.com/yozorajs/yozora/commit/ae328840bc9b25b1101203f302ae049c2d43b0d0))
|
|
695
|
+
* 🎨 format codes & add comments ([ba7ce7f](https://github.com/yozorajs/yozora/commit/ba7ce7f5af95ebac78bcf988e85aad9f520e1e98))
|
|
696
|
+
* 🚚 move tokenizers/block/* and tokenizers/inline/* to tokenizers/ ([c451e41](https://github.com/yozorajs/yozora/commit/c451e41d7d78e9dca078fa6feb0c548a3be7cc42))
|
|
697
|
+
* 🔖 publish v1.0.0-alpha.0 ([d7a394a](https://github.com/yozorajs/yozora/commit/d7a394affbdebe154b2eda5430f4440661f1c711))
|
|
698
|
+
* 🎨 remove useless types ([d430236](https://github.com/yozorajs/yozora/commit/d43023647638071fb184c2844e1dd6ea379ec877))
|
|
699
|
+
* 🎨 remove YastBlockNodeType and YastInlineNodeType, use YastNodeType instead ([2142b3d](https://github.com/yozorajs/yozora/commit/2142b3d9b9b8247202d78fca9571485cb1c13110))
|
|
700
|
+
* 🎨 rename EnhancedYastNodePoint to NodePoint & rename *WhiteSpace* to *Whitespace* ([988a99f](https://github.com/yozorajs/yozora/commit/988a99fcf448012fd07df0eacff72d7b5a0166fe))
|
|
701
|
+
* 🎨 rewrite @yozora/jest-for-tokenizer & update tests ([2b68af6](https://github.com/yozorajs/yozora/commit/2b68af63e0ea2c267b2c8c7581998cfba8197bd4))
|
|
702
|
+
* 🎨 rewrite @yozora/tokenziercore-block and update block tokenizers ([e07f874](https://github.com/yozorajs/yozora/commit/e07f87481499f73a856d65f75dec17c64e42a3b6))
|
|
703
|
+
* 🎨 rewrite string preprocessing algorithm to support tabs and line ends ([1312f88](https://github.com/yozorajs/yozora/commit/1312f88e3ae5940d8fd4c616a1fec23284b89287))
|
|
704
|
+
* 🎨 update BlockTokenizer types ([5fa2b42](https://github.com/yozorajs/yozora/commit/5fa2b42c520a1ca13b4fe8dc7d10d0dabbda93f4))
|
|
705
|
+
* 🎨 update BlockYastNode types ([7d1bda8](https://github.com/yozorajs/yozora/commit/7d1bda887ea88b150128b6095d737f7991eea791))
|
|
706
|
+
* 🚧 update due to the change of @yozora/tokenizercore-block & format codes & update @yozora/list-*-item ([fcfaa64](https://github.com/yozorajs/yozora/commit/fcfaa64f4b6f06d861db8960bdc9c434e3c7805e))
|
|
707
|
+
* 🚧 update due to the change of the @yozora/tokenziercore-block ([212b913](https://github.com/yozorajs/yozora/commit/212b913b5305581f0898571516ea648dc1fda28c))
|
|
708
|
+
* 📝 update READMEs ([9657e0c](https://github.com/yozorajs/yozora/commit/9657e0c41b37e526ad469f4e45d5d080a92171fb))
|
|
709
|
+
* ✅ update tests due to the change of @yozora/jest-for-tokenizer ([e54a56e](https://github.com/yozorajs/yozora/commit/e54a56e96016333436c5146535c8fbbf83d55ec2))
|
|
710
|
+
* 🚧 update tokenizer shape & support to update the member variables in constructor ([a542f34](https://github.com/yozorajs/yozora/commit/a542f340a3beeddb5a7cef95f7d4a2913ce92b1b))
|
|
711
|
+
* ⬆️ upgrade devDependencies @barusu/* ([4a5a0e1](https://github.com/yozorajs/yozora/commit/4a5a0e1d2e5c4910d7a3f64fa0f9d1177e313de7))
|
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/v2.1.5/tokenizers/fenced-code#readme">@yozora/tokenizer-fenced-code</a>
|
|
6
6
|
</h1>
|
|
7
7
|
<div align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/@yozora/tokenizer-fenced-code">
|
|
@@ -215,53 +215,53 @@ Name | Type | Required | Default
|
|
|
215
215
|
|
|
216
216
|
[live-examples]: https://yozora.guanghechen.com/docs/package/tokenizer-fenced-code#live-examples
|
|
217
217
|
[docpage]: https://yozora.guanghechen.com/docs/package/tokenizer-fenced-code
|
|
218
|
-
[homepage]: https://github.com/yozorajs/yozora/tree/
|
|
218
|
+
[homepage]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/fenced-code#readme
|
|
219
219
|
[gfm-spec]: https://github.github.com/gfm
|
|
220
220
|
[mdast-homepage]: https://github.com/syntax-tree/mdast
|
|
221
221
|
|
|
222
|
-
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/
|
|
223
|
-
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/
|
|
224
|
-
[@yozora/character]: https://github.com/yozorajs/yozora/tree/
|
|
222
|
+
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/ast#readme
|
|
223
|
+
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/ast-util#readme
|
|
224
|
+
[@yozora/character]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/character#readme
|
|
225
225
|
[@yozora/eslint-config]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/eslint-config#readme
|
|
226
|
-
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/
|
|
227
|
-
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
228
|
-
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/
|
|
226
|
+
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/core-parser#readme
|
|
227
|
+
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/core-tokenizer#readme
|
|
228
|
+
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/invariant#readme
|
|
229
229
|
[@yozora/jest-for-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/jest-for-tokenizer#readme
|
|
230
|
-
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/
|
|
231
|
-
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/
|
|
232
|
-
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/
|
|
230
|
+
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/parser#readme
|
|
231
|
+
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/parser-gfm#readme
|
|
232
|
+
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/v2.1.5/packages/parser-gfm-ex#readme
|
|
233
233
|
[@yozora/template-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/template-tokenizer#readme
|
|
234
|
-
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/
|
|
235
|
-
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/
|
|
236
|
-
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/
|
|
237
|
-
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/
|
|
238
|
-
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/
|
|
239
|
-
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/
|
|
240
|
-
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/
|
|
241
|
-
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/
|
|
242
|
-
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/
|
|
243
|
-
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/
|
|
244
|
-
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/
|
|
245
|
-
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/
|
|
246
|
-
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/
|
|
247
|
-
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/
|
|
248
|
-
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/
|
|
249
|
-
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/
|
|
250
|
-
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/
|
|
251
|
-
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/
|
|
252
|
-
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/
|
|
253
|
-
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/
|
|
254
|
-
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/
|
|
255
|
-
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/
|
|
256
|
-
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/
|
|
257
|
-
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/
|
|
258
|
-
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/
|
|
259
|
-
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/
|
|
260
|
-
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/
|
|
261
|
-
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/
|
|
262
|
-
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/
|
|
263
|
-
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/
|
|
264
|
-
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/
|
|
234
|
+
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/admonition#readme
|
|
235
|
+
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/autolink#readme
|
|
236
|
+
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/autolink-extension#readme
|
|
237
|
+
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/blockquote#readme
|
|
238
|
+
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/break#readme
|
|
239
|
+
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/definition#readme
|
|
240
|
+
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/delete#readme
|
|
241
|
+
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/ecma-import#readme
|
|
242
|
+
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/emphasis#readme
|
|
243
|
+
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/fenced-block#readme
|
|
244
|
+
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/fenced-code#readme
|
|
245
|
+
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/footnote#readme
|
|
246
|
+
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/footnote-definition#readme
|
|
247
|
+
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/footnote-reference#readme
|
|
248
|
+
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/heading#readme
|
|
249
|
+
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/html-block#readme
|
|
250
|
+
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/html-inline#readme
|
|
251
|
+
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/image#readme
|
|
252
|
+
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/image-reference#readme
|
|
253
|
+
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/indented-code#readme
|
|
254
|
+
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/inline-code#readme
|
|
255
|
+
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/inline-math#readme
|
|
256
|
+
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/link#readme
|
|
257
|
+
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/link-reference#readme
|
|
258
|
+
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/list#readme
|
|
259
|
+
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/math#readme
|
|
260
|
+
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/paragraph#readme
|
|
261
|
+
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/setext-heading#readme
|
|
262
|
+
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/table#readme
|
|
263
|
+
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/text#readme
|
|
264
|
+
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/v2.1.5/tokenizers/thematic-break#readme
|
|
265
265
|
|
|
266
266
|
[@yozora/react-admonition]: https://github.com/yozorajs/yozora-react/tree/main/packages/admonition#readme
|
|
267
267
|
[@yozora/react-blockquote]: https://github.com/yozorajs/yozora-react/tree/main/packages/blockquote#readme
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-fenced-code",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "guanghechen",
|
|
6
6
|
"url": "https://github.com/guanghechen/"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"lib/",
|
|
30
|
-
"
|
|
30
|
+
"!lib/**/*.map",
|
|
31
31
|
"package.json",
|
|
32
32
|
"CHANGELOG.md",
|
|
33
33
|
"LICENSE",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"test": "cross-env TS_NODE_FILES=true NODE_OPTIONS=--experimental-vm-modules jest --config ../../jest.config.mjs --rootDir ."
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@yozora/ast": "^2.1.
|
|
43
|
-
"@yozora/character": "^2.1.
|
|
44
|
-
"@yozora/core-tokenizer": "^2.1.
|
|
45
|
-
"@yozora/tokenizer-fenced-block": "^2.1.
|
|
42
|
+
"@yozora/ast": "^2.1.5",
|
|
43
|
+
"@yozora/character": "^2.1.5",
|
|
44
|
+
"@yozora/core-tokenizer": "^2.1.5",
|
|
45
|
+
"@yozora/tokenizer-fenced-block": "^2.1.5"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "4f753bcf0fd921938464802462dc48c53bbd014d"
|
|
48
48
|
}
|
package/src/index.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { match as fencedCodeMatch } from './match'
|
|
2
|
-
export { parse as fencedCodeParse } from './parse'
|
|
3
|
-
export { FencedCodeTokenizer, FencedCodeTokenizer as default } from './tokenizer'
|
|
4
|
-
export { uniqueName as FencedCodeTokenizerName } from './types'
|
|
5
|
-
export type {
|
|
6
|
-
IThis as IFencedCodeHookContext,
|
|
7
|
-
IToken as IFencedCodeToken,
|
|
8
|
-
ITokenizerProps as IFencedCodeTokenizerProps,
|
|
9
|
-
} from './types'
|
package/src/match.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IMatchBlockHook, IMatchBlockHookCreator } from '@yozora/core-tokenizer'
|
|
2
|
-
import { fencedBlockMatch } from '@yozora/tokenizer-fenced-block'
|
|
3
|
-
import type { IThis, IToken, T } from './types'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A code fence is a sequence of at least three consecutive backtick characters
|
|
7
|
-
* (`) or tildes (~). (Tildes and backticks cannot be mixed.) A fenced code
|
|
8
|
-
* block begins with a code fence, indented no more than three spaces.
|
|
9
|
-
*
|
|
10
|
-
* @see https://github.com/syntax-tree/mdast#code
|
|
11
|
-
* @see https://github.github.com/gfm/#code-fence
|
|
12
|
-
*/
|
|
13
|
-
export const match: IMatchBlockHookCreator<T, IToken, IThis> = function (api) {
|
|
14
|
-
const hook = fencedBlockMatch.call(this, api) as IMatchBlockHook<T, IToken>
|
|
15
|
-
return {
|
|
16
|
-
...hook,
|
|
17
|
-
isContainingBlock: false,
|
|
18
|
-
}
|
|
19
|
-
}
|
package/src/parse.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { CodeType } from '@yozora/ast'
|
|
2
|
-
import type { INodePoint } from '@yozora/character'
|
|
3
|
-
import {
|
|
4
|
-
calcEscapedStringFromNodePoints,
|
|
5
|
-
calcStringFromNodePoints,
|
|
6
|
-
isUnicodeWhitespaceCharacter,
|
|
7
|
-
} from '@yozora/character'
|
|
8
|
-
import type { IParseBlockHookCreator } from '@yozora/core-tokenizer'
|
|
9
|
-
import { eatOptionalWhitespaces, mergeContentLinesFaithfully } from '@yozora/core-tokenizer'
|
|
10
|
-
import type { INode, IThis, IToken, T } from './types'
|
|
11
|
-
|
|
12
|
-
export const parse: IParseBlockHookCreator<T, IToken, INode, IThis> = function (api) {
|
|
13
|
-
return {
|
|
14
|
-
parse: tokens =>
|
|
15
|
-
tokens.map(token => {
|
|
16
|
-
const infoString = token.infoString
|
|
17
|
-
|
|
18
|
-
// match lang
|
|
19
|
-
let i = 0
|
|
20
|
-
const langInfo: INodePoint[] = []
|
|
21
|
-
for (; i < infoString.length; ++i) {
|
|
22
|
-
const p = infoString[i]
|
|
23
|
-
if (isUnicodeWhitespaceCharacter(p.codePoint)) break
|
|
24
|
-
langInfo.push(p)
|
|
25
|
-
}
|
|
26
|
-
const lang: string = calcEscapedStringFromNodePoints(langInfo, 0, langInfo.length, true)
|
|
27
|
-
|
|
28
|
-
// match meta
|
|
29
|
-
i = eatOptionalWhitespaces(infoString, i, infoString.length)
|
|
30
|
-
const meta: string = calcEscapedStringFromNodePoints(infoString, i, infoString.length, true)
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* match content
|
|
34
|
-
* Backslash escape works in info strings in fenced code blocks.
|
|
35
|
-
* @see https://github.github.com/gfm/#example-320
|
|
36
|
-
*/
|
|
37
|
-
const contents: INodePoint[] = mergeContentLinesFaithfully(token.lines)
|
|
38
|
-
let value: string = calcStringFromNodePoints(contents)
|
|
39
|
-
if (!/\n$/.test(value)) value += '\n'
|
|
40
|
-
|
|
41
|
-
const node: INode = api.shouldReservePosition
|
|
42
|
-
? {
|
|
43
|
-
type: CodeType,
|
|
44
|
-
position: token.position,
|
|
45
|
-
lang: lang.length > 0 ? lang : null,
|
|
46
|
-
meta: meta.length > 0 ? meta : null,
|
|
47
|
-
value,
|
|
48
|
-
}
|
|
49
|
-
: {
|
|
50
|
-
type: CodeType,
|
|
51
|
-
lang: lang.length > 0 ? lang : null,
|
|
52
|
-
meta: meta.length > 0 ? meta : null,
|
|
53
|
-
value,
|
|
54
|
-
}
|
|
55
|
-
return node
|
|
56
|
-
}),
|
|
57
|
-
}
|
|
58
|
-
}
|
package/src/tokenizer.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { CodeType } from '@yozora/ast'
|
|
2
|
-
import { AsciiCodePoint } from '@yozora/character'
|
|
3
|
-
import type {
|
|
4
|
-
IBlockTokenizer,
|
|
5
|
-
IMatchBlockHookCreator,
|
|
6
|
-
IParseBlockHookCreator,
|
|
7
|
-
} from '@yozora/core-tokenizer'
|
|
8
|
-
import { TokenizerPriority } from '@yozora/core-tokenizer'
|
|
9
|
-
import FencedBlockTokenizer from '@yozora/tokenizer-fenced-block'
|
|
10
|
-
import { match } from './match'
|
|
11
|
-
import { parse } from './parse'
|
|
12
|
-
import type { INode, IThis, IToken, ITokenizerProps, T } from './types'
|
|
13
|
-
import { uniqueName } from './types'
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Lexical Analyzer for FencedCode.
|
|
17
|
-
* @see https://github.com/syntax-tree/mdast#code
|
|
18
|
-
* @see https://github.github.com/gfm/#code-fence
|
|
19
|
-
*/
|
|
20
|
-
export class FencedCodeTokenizer
|
|
21
|
-
extends FencedBlockTokenizer<T, INode, IThis>
|
|
22
|
-
implements IBlockTokenizer<T, IToken, INode, IThis>
|
|
23
|
-
{
|
|
24
|
-
/* istanbul ignore next */
|
|
25
|
-
constructor(props: ITokenizerProps = {}) {
|
|
26
|
-
super({
|
|
27
|
-
name: props.name ?? uniqueName,
|
|
28
|
-
priority: props.priority ?? TokenizerPriority.FENCED_BLOCK,
|
|
29
|
-
nodeType: CodeType,
|
|
30
|
-
markers: [AsciiCodePoint.BACKTICK, AsciiCodePoint.TILDE],
|
|
31
|
-
markersRequired: 3,
|
|
32
|
-
checkInfoString: (infoString, marker): boolean => {
|
|
33
|
-
/**
|
|
34
|
-
* Info strings for backtick code blocks cannot contain backticks:
|
|
35
|
-
* Info strings for tilde code blocks can contain backticks and tildes
|
|
36
|
-
* @see https://github.github.com/gfm/#example-115
|
|
37
|
-
* @see https://github.github.com/gfm/#example-116
|
|
38
|
-
*/
|
|
39
|
-
if (marker === AsciiCodePoint.BACKTICK) {
|
|
40
|
-
for (const p of infoString) {
|
|
41
|
-
if (p.codePoint === AsciiCodePoint.BACKTICK) return false
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return true
|
|
45
|
-
},
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
public override readonly match: IMatchBlockHookCreator<T, IToken, IThis> = match
|
|
50
|
-
|
|
51
|
-
public override readonly parse: IParseBlockHookCreator<T, IToken, INode, IThis> = parse
|
|
52
|
-
}
|
package/src/types.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Code, CodeType } from '@yozora/ast'
|
|
2
|
-
import type { IBaseBlockTokenizerProps } from '@yozora/core-tokenizer'
|
|
3
|
-
import type { IFencedBlockHookContext, IFencedBlockToken } from '@yozora/tokenizer-fenced-block'
|
|
4
|
-
|
|
5
|
-
export type T = CodeType
|
|
6
|
-
export type INode = Code
|
|
7
|
-
export const uniqueName = '@yozora/tokenizer-fenced-code'
|
|
8
|
-
|
|
9
|
-
export type IToken = IFencedBlockToken<T>
|
|
10
|
-
|
|
11
|
-
export type IThis = IFencedBlockHookContext<T>
|
|
12
|
-
|
|
13
|
-
export type ITokenizerProps = Partial<IBaseBlockTokenizerProps>
|