@webc.site/math 0.1.12 → 0.1.16
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 +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
<a id="en"></a>
|
|
6
|
+
|
|
6
7
|
# @webc.site/math
|
|
7
8
|
|
|
8
9
|
### The world's smallest and fastest web Markdown formula renderer
|
|
@@ -455,6 +456,7 @@ The `18s` project provides a optimized math font `m` (Latin Modern Math, derived
|
|
|
455
456
|
---
|
|
456
457
|
|
|
457
458
|
<a id="zh"></a>
|
|
459
|
+
|
|
458
460
|
# @webc.site/math
|
|
459
461
|
|
|
460
462
|
### 全球最小最快的网页 Markdown 公式渲染器
|
|
@@ -638,7 +640,7 @@ math {
|
|
|
638
640
|
## 功能特性
|
|
639
641
|
|
|
640
642
|
- **功能完备**:从 KaTeX 和 MathJax 官方测试用例库中抽取了数千个公式进行编译测试,全部通过(测试用例见 [extract](https://github.com/webc-site/math/tree/dev/extract))。
|
|
641
|
-
-
|
|
643
|
+
- **健壮容错**:在解析 Markdown 文本时,公式中的语法错误(如未闭合的 `\left`/`\right` 或其他非法语法)会被自动捕获并优雅退化,直接返回原始的 TeX 代码而不抛出 JavaScript 异常,防止前端应用崩溃。
|
|
642
644
|
- **快速编译**:直接编译 TeX 公式为语义化 MathML,无外部解析器依赖。
|
|
643
645
|
- **Markdown 集成**:自动解析 Markdown 文本中的行内公式(`$ 公式 $`)和块级公式(`$$ 公式 $$`)。
|
|
644
646
|
- **高性能**:原始体积仅 7.78 KB(Gzip 压缩后 3.58 KB),体积远小于 KaTeX 和 MathJax(见下图体积对比):
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@webc.site/math","version":"0.1.
|
|
1
|
+
{"name":"@webc.site/math","version":"0.1.16","description":"The world's smallest and fastest web Markdown formula renderer / 全球最小最快的网页Markdown公式渲染器","keywords":["markdown","math","mathml","render","tex"],"homepage":"https://math.webc.site","license":"MulanPSL-2.0","author":"i18n.site@gmail.com","repository":{"type":"git","url":"git+https://github.com/webc-site/math.git"},"type":"module","exports":{".":{"types":"./mathml.d.ts","default":"./mathml.js"},"./md.js":{"types":"./md.d.ts","default":"./md.js"},"./*":"./*"},"dependencies":{}}
|