@mathcrowd/mmarked 3.1.2 → 3.1.4
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 +17 -79
- package/README.md +27 -1
- package/README.zh.md +27 -1
- package/dist/browser.umd.js +1 -1
- package/dist/demo.esm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.mjs +1 -1
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
## [3.1.
|
|
1
|
+
## [3.1.4](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v3.1.3...v3.1.4) (2026-04-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* exclude .map files from npm package ([69a9436](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/69a9436b8742972cd10a8f9314092590b3fdddb8))
|
|
7
|
+
* prevent trigger-update race condition by fetching existing update-dependencies branch ([e3f0826](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/e3f0826f7a03e7ac2bc5af0a6e370beebb1a7f6f))
|
|
8
|
+
* rebase update-dependencies branch on main before updating ([a6709bb](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/a6709bbbd90362b6e8be302edf48aefcd4a359e5))
|
|
9
|
+
* upgrade trigger-update to semver-aware strategy and add release script ([3c0a5b2](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/3c0a5b257c354969040f5e07b995195a77d2ec07))
|
|
2
10
|
|
|
3
11
|
|
|
4
12
|
### Features
|
|
5
13
|
|
|
6
|
-
*
|
|
14
|
+
* add i18n locale support for built-in labels (zh/en) ([4bb0bf9](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/4bb0bf99f647ced1e6340a9c7ba672df412a0d2f))
|
|
7
15
|
|
|
16
|
+
## [3.1.3](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v3.1.2...v3.1.3) (2026-03-27)
|
|
8
17
|
|
|
18
|
+
## [3.1.2](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v3.1.1...v3.1.2) (2026-03-23)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **tooltip:** 重构 tooltip 扩展,图片链接改为可选项 ([fc33c0b](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/fc33c0bb1bccfdb0948b0806f9431b89e5b9aecf))
|
|
9
24
|
|
|
10
25
|
## [3.1.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v3.1.0...v3.1.1) (2026-01-22)
|
|
11
26
|
|
|
@@ -15,8 +30,6 @@
|
|
|
15
30
|
* **test:** 修复 Jest 测试无法正常退出的问题 ([922d5ec](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/922d5ecf32e710ecaa8063e8769dada613d0fee5))
|
|
16
31
|
* 修复 MathJax 内存泄漏问题 ([e7ad29d](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/e7ad29df760f69d0ebe6e1f312c1812d3fbbb856))
|
|
17
32
|
|
|
18
|
-
|
|
19
|
-
|
|
20
33
|
# [3.1.0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v3.0.1...v3.1.0) (2025-12-26)
|
|
21
34
|
|
|
22
35
|
|
|
@@ -24,8 +37,6 @@
|
|
|
24
37
|
|
|
25
38
|
* optimize performance with singleton pattern and auto license config ([8a1f46c](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/8a1f46c69a75205f9498f3674df96bbbd4905d0d))
|
|
26
39
|
|
|
27
|
-
|
|
28
|
-
|
|
29
40
|
## [3.0.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v3.0.0...v3.0.1) (2025-12-26)
|
|
30
41
|
|
|
31
42
|
|
|
@@ -33,8 +44,6 @@
|
|
|
33
44
|
|
|
34
45
|
* **license:** add validation caching to improve performance ([220d21b](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/220d21b3937210752930c236b29731f13163190b))
|
|
35
46
|
|
|
36
|
-
|
|
37
|
-
|
|
38
47
|
# [3.0.0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v2.0.3...v3.0.0) (2025-12-25)
|
|
39
48
|
|
|
40
49
|
|
|
@@ -49,8 +58,6 @@
|
|
|
49
58
|
|
|
50
59
|
* add Node.js-only license validation with browser exemption ([e767164](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/e767164129faedb29f32af9bd9aafa1da5c559a3))
|
|
51
60
|
|
|
52
|
-
|
|
53
|
-
|
|
54
61
|
## [2.0.3](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v2.0.2...v2.0.3) (2025-10-12)
|
|
55
62
|
|
|
56
63
|
|
|
@@ -59,8 +66,6 @@
|
|
|
59
66
|
* **build:** preserve .gitignore in docs directory ([f9c1e79](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/f9c1e792c8d79311fa98c30eb6cb794cfaa870c6))
|
|
60
67
|
* **ci:** remove build steps from GitHub release workflow ([d3d74c6](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/d3d74c63706546c848d6a64f71dc4281cec76414))
|
|
61
68
|
|
|
62
|
-
|
|
63
|
-
|
|
64
69
|
## [2.0.2](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v2.0.1...v2.0.2) (2025-10-12)
|
|
65
70
|
|
|
66
71
|
|
|
@@ -68,16 +73,10 @@
|
|
|
68
73
|
|
|
69
74
|
* fix demo missing demo.esm.js. ([5785ce0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/5785ce0270d9c2d1047e3e71bcb25ff9407352f2))
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
|
|
73
76
|
## [2.0.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.8...v2.0.1) (2025-10-04)
|
|
74
77
|
|
|
75
|
-
|
|
76
|
-
|
|
77
78
|
## [1.8.8](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.7...v1.8.8) (2025-09-10)
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
80
|
## [1.8.7](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.6...v1.8.7) (2025-07-23)
|
|
82
81
|
|
|
83
82
|
|
|
@@ -86,8 +85,6 @@
|
|
|
86
85
|
* [#18](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/issues/18) footnotes in table bug fixed. ([ec0e561](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/ec0e5610224b27362dcf9c7fce2751c8b332bd49))
|
|
87
86
|
* eslint timeout fixed. ([8d180e6](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/8d180e6061809c71d5604053b6f1a02151e8e25e))
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
88
|
## [1.8.6](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.5...v1.8.6) (2025-03-27)
|
|
92
89
|
|
|
93
90
|
|
|
@@ -95,16 +92,10 @@
|
|
|
95
92
|
|
|
96
93
|
* rollup config. ([806e7d5](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/806e7d5e8f97d5ddb317e98ebdd0ca4817f6aa30))
|
|
97
94
|
|
|
98
|
-
|
|
99
|
-
|
|
100
95
|
## [1.8.5](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.4...v1.8.5) (2025-03-06)
|
|
101
96
|
|
|
102
|
-
|
|
103
|
-
|
|
104
97
|
## [1.8.4](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.3...v1.8.4) (2024-12-19)
|
|
105
98
|
|
|
106
|
-
|
|
107
|
-
|
|
108
99
|
## [1.8.3](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.2...v1.8.3) (2024-12-19)
|
|
109
100
|
|
|
110
101
|
|
|
@@ -112,8 +103,6 @@
|
|
|
112
103
|
|
|
113
104
|
* eslint upgraded to v9. ([806c4c1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/806c4c15b02e8f18a09b8032be6c2d57e596ba0a))
|
|
114
105
|
|
|
115
|
-
|
|
116
|
-
|
|
117
106
|
## [1.8.2](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.1...v1.8.2) (2024-10-29)
|
|
118
107
|
|
|
119
108
|
|
|
@@ -121,8 +110,6 @@
|
|
|
121
110
|
|
|
122
111
|
* use span instead of div for tooltip. ([5373666](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/5373666707603b335384e57efa7257722dc42afb))
|
|
123
112
|
|
|
124
|
-
|
|
125
|
-
|
|
126
113
|
## [1.8.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.8.0...v1.8.1) (2024-10-29)
|
|
127
114
|
|
|
128
115
|
|
|
@@ -135,8 +122,6 @@
|
|
|
135
122
|
|
|
136
123
|
* tooltip trigger by click using checkbox. ([783f758](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/783f758fd61f9677ac9ba192c143aac1747f6bb7))
|
|
137
124
|
|
|
138
|
-
|
|
139
|
-
|
|
140
125
|
# [1.8.0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.11...v1.8.0) (2024-10-28)
|
|
141
126
|
|
|
142
127
|
|
|
@@ -145,16 +130,10 @@
|
|
|
145
130
|
* exts reorganized & tooltip supported. ([9a2f6c6](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/9a2f6c620220a25f4cbd29571e8f82e59c28662c))
|
|
146
131
|
* tokenizer/renderer/rules config reorgnized. ([7aa58d3](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/7aa58d38d2a93d52efe1657aeb19b22680b5346a))
|
|
147
132
|
|
|
148
|
-
|
|
149
|
-
|
|
150
133
|
## [1.7.11](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.10...v1.7.11) (2024-10-25)
|
|
151
134
|
|
|
152
|
-
|
|
153
|
-
|
|
154
135
|
## [1.7.10](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.9...v1.7.10) (2024-10-25)
|
|
155
136
|
|
|
156
|
-
|
|
157
|
-
|
|
158
137
|
## [1.7.9](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.8...v1.7.9) (2024-10-23)
|
|
159
138
|
|
|
160
139
|
|
|
@@ -162,8 +141,6 @@
|
|
|
162
141
|
|
|
163
142
|
* gallery extension added. ([c578412](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/c578412cc4ffab4226bfc068165e99f1dc631219))
|
|
164
143
|
|
|
165
|
-
|
|
166
|
-
|
|
167
144
|
## [1.7.8](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.7...v1.7.8) (2024-10-22)
|
|
168
145
|
|
|
169
146
|
|
|
@@ -171,8 +148,6 @@
|
|
|
171
148
|
|
|
172
149
|
* pacakge.json updated. ([356e1b0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/356e1b0b22b5307d09bc6ba977485caa835e5dd3))
|
|
173
150
|
|
|
174
|
-
|
|
175
|
-
|
|
176
151
|
## [1.7.7](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.6...v1.7.7) (2024-10-22)
|
|
177
152
|
|
|
178
153
|
|
|
@@ -180,8 +155,6 @@
|
|
|
180
155
|
|
|
181
156
|
* [#10](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/issues/10) do not show link when footnote not referenced. ([8ea8008](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/8ea80087c85f572cd9099eee227adb77143b2de9))
|
|
182
157
|
|
|
183
|
-
|
|
184
|
-
|
|
185
158
|
## [1.7.6](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.5...v1.7.6) (2024-10-22)
|
|
186
159
|
|
|
187
160
|
|
|
@@ -190,8 +163,6 @@
|
|
|
190
163
|
* add caption support to table. ([aca91fa](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/aca91fabb81fee9164fbbcca80ecc0683794e93d))
|
|
191
164
|
* add checkbox in list support. ([7d65c80](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/7d65c808f24a1415c0414e717de4bf240599860a))
|
|
192
165
|
|
|
193
|
-
|
|
194
|
-
|
|
195
166
|
## [1.7.5](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.3...v1.7.5) (2024-10-16)
|
|
196
167
|
|
|
197
168
|
|
|
@@ -204,8 +175,6 @@
|
|
|
204
175
|
|
|
205
176
|
* alert icon updated. ([b674540](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/b674540f3b57fa96ef3e4827ee57bdd5cad75e45))
|
|
206
177
|
|
|
207
|
-
|
|
208
|
-
|
|
209
178
|
## [1.7.3](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.2...v1.7.3) (2024-09-26)
|
|
210
179
|
|
|
211
180
|
|
|
@@ -213,8 +182,6 @@
|
|
|
213
182
|
|
|
214
183
|
* alert syntax added. ([b52c5be](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/b52c5be2d5a1e5c9af7a63f39a08a74ff078fad2))
|
|
215
184
|
|
|
216
|
-
|
|
217
|
-
|
|
218
185
|
## [1.7.2](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.1...v1.7.2) (2024-09-25)
|
|
219
186
|
|
|
220
187
|
|
|
@@ -222,16 +189,10 @@
|
|
|
222
189
|
|
|
223
190
|
* classname added/updated. ([e51de90](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/e51de90064ed641a9b229c00e7695ce77df7f4e6))
|
|
224
191
|
|
|
225
|
-
|
|
226
|
-
|
|
227
192
|
## [1.7.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.7.0...v1.7.1) (2024-09-24)
|
|
228
193
|
|
|
229
|
-
|
|
230
|
-
|
|
231
194
|
# [1.7.0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.6.3...v1.7.0) (2024-09-24)
|
|
232
195
|
|
|
233
|
-
|
|
234
|
-
|
|
235
196
|
## [1.6.3](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.6.1...v1.6.3) (2024-09-24)
|
|
236
197
|
|
|
237
198
|
|
|
@@ -239,8 +200,6 @@
|
|
|
239
200
|
|
|
240
201
|
* npm install command fixed. ([b0bea6d](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/b0bea6d48eafa1dcd361fc6b01ad8db84c24b2ff))
|
|
241
202
|
|
|
242
|
-
|
|
243
|
-
|
|
244
203
|
## [1.6.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.6.0...v1.6.1) (2024-09-20)
|
|
245
204
|
|
|
246
205
|
|
|
@@ -248,8 +207,6 @@
|
|
|
248
207
|
|
|
249
208
|
* demo page links fixed. ([9b40d38](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/9b40d38a572ac1dd3c3dfdd70ed28d8072ab54c0))
|
|
250
209
|
|
|
251
|
-
|
|
252
|
-
|
|
253
210
|
# [1.6.0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.5.5...v1.6.0) (2024-09-20)
|
|
254
211
|
|
|
255
212
|
|
|
@@ -257,8 +214,6 @@
|
|
|
257
214
|
|
|
258
215
|
* web integration supported. ([487f2cc](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/487f2cccc4489c13329ca7181408818f107b3eda))
|
|
259
216
|
|
|
260
|
-
|
|
261
|
-
|
|
262
217
|
## [1.5.5](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.5.0...v1.5.5) (2024-09-18)
|
|
263
218
|
|
|
264
219
|
|
|
@@ -271,12 +226,8 @@
|
|
|
271
226
|
|
|
272
227
|
* support unnumbered theorem block. ([32cf3a0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/32cf3a0f44dfa0cf3797a16b2f7bc9104775f413))
|
|
273
228
|
|
|
274
|
-
|
|
275
|
-
|
|
276
229
|
# [1.5.0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.3.3...v1.5.0) (2024-09-04)
|
|
277
230
|
|
|
278
|
-
|
|
279
|
-
|
|
280
231
|
## [1.3.3](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.3.2...v1.3.3) (2024-08-14)
|
|
281
232
|
|
|
282
233
|
|
|
@@ -284,8 +235,6 @@
|
|
|
284
235
|
|
|
285
236
|
* image size. [#7](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/issues/7) ([4bf2f68](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/4bf2f680d61cf8084a2be66e5709d46509b3a1a0))
|
|
286
237
|
|
|
287
|
-
|
|
288
|
-
|
|
289
238
|
## [1.3.2](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.3.1...v1.3.2) (2024-08-08)
|
|
290
239
|
|
|
291
240
|
|
|
@@ -293,8 +242,6 @@
|
|
|
293
242
|
|
|
294
243
|
* add 'px' to image size. ([7aacb77](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/7aacb77512d418652e5e6b194fbb7278ce447c1d))
|
|
295
244
|
|
|
296
|
-
|
|
297
|
-
|
|
298
245
|
## [1.3.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.2.2...v1.3.1) (2024-08-06)
|
|
299
246
|
|
|
300
247
|
|
|
@@ -304,12 +251,8 @@
|
|
|
304
251
|
* project reorgnized. ([2d4b437](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/2d4b4374e9451e0236e8d609c26f19ebcdf09872))
|
|
305
252
|
* rollup livereload / highlight added. ([4b893bf](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/4b893bf535165a61821d89c0e341d5820473710d))
|
|
306
253
|
|
|
307
|
-
|
|
308
|
-
|
|
309
254
|
## [1.2.2](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.2.1...v1.2.2) (2024-08-01)
|
|
310
255
|
|
|
311
|
-
|
|
312
|
-
|
|
313
256
|
## [1.2.1](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/v1.2.0...v1.2.1) (2024-08-01)
|
|
314
257
|
|
|
315
258
|
|
|
@@ -317,8 +260,6 @@
|
|
|
317
260
|
|
|
318
261
|
* ts error https://github.com/markedjs/marked/issues/3101 ([1991650](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/1991650e64c513adb97bb4d31b12f3d0ae10a352))
|
|
319
262
|
|
|
320
|
-
|
|
321
|
-
|
|
322
263
|
# [1.2.0](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/compare/3d84e4de2829de5ae4f03efc51eadc9b279eb775...v1.2.0) (2024-08-01)
|
|
323
264
|
|
|
324
265
|
|
|
@@ -341,6 +282,3 @@
|
|
|
341
282
|
* trigger updating dependencies. ([a0d167b](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/a0d167b6de42fdfd5f3eb712d24bf926af3ce650))
|
|
342
283
|
* upgrade marked.js to v13 ([af45a2f](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/af45a2f90f207069df23f0da65ff7dab31155e24))
|
|
343
284
|
* use section instead of div. ([3d84e4d](https://cloud.mathcrowd.cn:2444/agile/frontend/mathcrowd-marked-lib/commits/3d84e4de2829de5ae4f03efc51eadc9b279eb775))
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Transform your Markdown experience with **mmarked** - a powerful TypeScript libr
|
|
|
25
25
|
### Core Capabilities
|
|
26
26
|
|
|
27
27
|
- ✅ **Full CommonMark Support** - Complete compatibility with standard Markdown syntax
|
|
28
|
+
- 🌐 **I18n Support** - Built-in Chinese/English locale for theorem, proof, footnote labels
|
|
28
29
|
- 🔗 **Easy Integration** - Works seamlessly in Node.js and browser environments
|
|
29
30
|
- 📦 **Lightweight Core** - Minimal dependencies, extensible architecture
|
|
30
31
|
- ⚡ **High Performance** - Optimized rendering pipeline for fast output
|
|
@@ -77,6 +78,10 @@ This fundamental theorem (see [~pythagoras]) relates the sides of right triangle
|
|
|
77
78
|
|
|
78
79
|
console.log(result.parsed) // HTML output
|
|
79
80
|
console.log(result.time) // Rendering time in ms
|
|
81
|
+
|
|
82
|
+
// Render with English locale
|
|
83
|
+
const enResult = renderMarkdown(`...`, { locale: 'en' })
|
|
84
|
+
// Theorem → "Theorem", Proof → "Proof", Footnotes → "Footnotes"
|
|
80
85
|
```
|
|
81
86
|
|
|
82
87
|
### License Configuration (Node.js Only)
|
|
@@ -234,12 +239,16 @@ configureLicense({
|
|
|
234
239
|
|
|
235
240
|
### Core Functions
|
|
236
241
|
|
|
237
|
-
#### `renderMarkdown(markdown: string)`
|
|
242
|
+
#### `renderMarkdown(markdown: string, options?: { locale?: Locale })`
|
|
238
243
|
|
|
239
244
|
Renders Markdown to HTML with full feature support.
|
|
240
245
|
|
|
241
246
|
**License:** Requires valid license for commercial use in Node.js. Free in browsers.
|
|
242
247
|
|
|
248
|
+
**Parameters:**
|
|
249
|
+
- `markdown`: Markdown source string
|
|
250
|
+
- `options.locale`: `'zh'` (default) or `'en'` — controls built-in labels for theorem-like blocks, solution/proof blocks, and footnote headings
|
|
251
|
+
|
|
243
252
|
**Returns:**
|
|
244
253
|
```typescript
|
|
245
254
|
{
|
|
@@ -249,10 +258,27 @@ Renders Markdown to HTML with full feature support.
|
|
|
249
258
|
}
|
|
250
259
|
```
|
|
251
260
|
|
|
261
|
+
**Locale mapping:**
|
|
262
|
+
|
|
263
|
+
| Keyword | `zh` (default) | `en` |
|
|
264
|
+
|---------|---------------|------|
|
|
265
|
+
| `theorem` | 定理 | Theorem |
|
|
266
|
+
| `lemma` | 引理 | Lemma |
|
|
267
|
+
| `corollary` | 推论 | Corollary |
|
|
268
|
+
| `axiom` | 公理 | Axiom |
|
|
269
|
+
| `definition` | 定义 | Definition |
|
|
270
|
+
| `example` | 例 | Example |
|
|
271
|
+
| `proof` | 证明 | Proof |
|
|
272
|
+
| `solution` | 解答 | Solution |
|
|
273
|
+
| Footnote heading | 脚注 | Footnotes |
|
|
274
|
+
|
|
252
275
|
**Example:**
|
|
253
276
|
```typescript
|
|
254
277
|
const { parsed, time } = renderMarkdown('# Hello $x^2$')
|
|
255
278
|
console.log(`Rendered in ${time}ms`)
|
|
279
|
+
|
|
280
|
+
// English locale
|
|
281
|
+
const { parsed: enHtml } = renderMarkdown(md, { locale: 'en' })
|
|
256
282
|
```
|
|
257
283
|
|
|
258
284
|
#### `renderMarkdownCompact(markdown: string)`
|
package/README.zh.md
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
### 核心能力
|
|
26
26
|
|
|
27
27
|
- ✅ **完整 CommonMark 支持** - 与标准 Markdown 语法完全兼容
|
|
28
|
+
- 🌐 **多语言支持** - 内置中英文 locale,定理、证明、脚注等标签自动切换
|
|
28
29
|
- 🔗 **轻松集成** - 在 Node.js 和浏览器环境中无缝运行
|
|
29
30
|
- 📦 **轻量核心** - 最少依赖,可扩展架构
|
|
30
31
|
- ⚡ **高性能** - 优化的渲染管道,输出快速
|
|
@@ -77,6 +78,10 @@ $$a^2 + b^2 = c^2$$
|
|
|
77
78
|
|
|
78
79
|
console.log(result.parsed) // HTML 输出
|
|
79
80
|
console.log(result.time) // 渲染耗时(毫秒)
|
|
81
|
+
|
|
82
|
+
// 使用英文 locale 渲染
|
|
83
|
+
const enResult = renderMarkdown(`...`, { locale: 'en' })
|
|
84
|
+
// 定理 → "Theorem",证明 → "Proof",脚注 → "Footnotes"
|
|
80
85
|
```
|
|
81
86
|
|
|
82
87
|
### 许可证配置(仅 Node.js)
|
|
@@ -234,12 +239,16 @@ configureLicense({
|
|
|
234
239
|
|
|
235
240
|
### 核心函数
|
|
236
241
|
|
|
237
|
-
#### `renderMarkdown(markdown: string)`
|
|
242
|
+
#### `renderMarkdown(markdown: string, options?: { locale?: Locale })`
|
|
238
243
|
|
|
239
244
|
将 Markdown 渲染为 HTML,支持所有功能。
|
|
240
245
|
|
|
241
246
|
**许可证:** Node.js 商业使用需要有效许可证。浏览器免费使用。
|
|
242
247
|
|
|
248
|
+
**参数:**
|
|
249
|
+
- `markdown`:Markdown 源字符串
|
|
250
|
+
- `options.locale`:`'zh'`(默认)或 `'en'` —— 控制定理类块、证明/解答块、脚注标题的内置标签语言
|
|
251
|
+
|
|
243
252
|
**返回值:**
|
|
244
253
|
```typescript
|
|
245
254
|
{
|
|
@@ -249,10 +258,27 @@ configureLicense({
|
|
|
249
258
|
}
|
|
250
259
|
```
|
|
251
260
|
|
|
261
|
+
**Locale 对照表:**
|
|
262
|
+
|
|
263
|
+
| 关键字 | `zh`(默认) | `en` |
|
|
264
|
+
|--------|-------------|------|
|
|
265
|
+
| `theorem` | 定理 | Theorem |
|
|
266
|
+
| `lemma` | 引理 | Lemma |
|
|
267
|
+
| `corollary` | 推论 | Corollary |
|
|
268
|
+
| `axiom` | 公理 | Axiom |
|
|
269
|
+
| `definition` | 定义 | Definition |
|
|
270
|
+
| `example` | 例 | Example |
|
|
271
|
+
| `proof` | 证明 | Proof |
|
|
272
|
+
| `solution` | 解答 | Solution |
|
|
273
|
+
| 脚注标题 | 脚注 | Footnotes |
|
|
274
|
+
|
|
252
275
|
**示例:**
|
|
253
276
|
```typescript
|
|
254
277
|
const { parsed, time } = renderMarkdown('# 你好 $x^2$')
|
|
255
278
|
console.log(`渲染耗时 ${time}ms`)
|
|
279
|
+
|
|
280
|
+
// 英文 locale
|
|
281
|
+
const { parsed: enHtml } = renderMarkdown(md, { locale: 'en' })
|
|
256
282
|
```
|
|
257
283
|
|
|
258
284
|
#### `renderMarkdownCompact(markdown: string)`
|