@iftc/yete 0.0.1-alpha.6 → 0.0.1-alpha.7
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 +1 -1
- package/function/md2html.js +9 -2
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
1. 下载 Yete CLI:
|
|
11
11
|
- [Windows x64](https://dbmp-xbgmorqeur6oh81z.database.nocode.cn/storage/v1/object/public/files/yete.exe "yete.exe")
|
|
12
|
-
- [Linux arm64](https://dbmp-xbgmorqeur6oh81z.database.nocode.cn/storage/v1/object/public/files/yete "yete")
|
|
12
|
+
- [Linux arm64(适应于Termux)](https://dbmp-xbgmorqeur6oh81z.database.nocode.cn/storage/v1/object/public/files/yete "yete")
|
|
13
13
|
- [CLI源文件(其他操作系统请自行编译或直接使用 Txiki.js 运行)](https://dbmp-xbgmorqeur6oh81z.database.nocode.cn/storage/v1/object/public/files/yete.zip "yete.zip")
|
|
14
14
|
|
|
15
15
|
2. 创建并构建项目:
|
package/function/md2html.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
const { marked } = require('marked');
|
|
2
|
-
|
|
2
|
+
const katexExtension = require('marked-katex-extension');
|
|
3
|
+
marked.use(katexExtension());
|
|
4
|
+
/**
|
|
5
|
+
* Markdown转HTML
|
|
6
|
+
* @param {string} md
|
|
7
|
+
* @param {object} options
|
|
8
|
+
*/
|
|
9
|
+
module.exports = function (md, options = {}) {
|
|
3
10
|
if (md) {
|
|
4
|
-
return marked(md);
|
|
11
|
+
return marked(md, options);
|
|
5
12
|
}
|
|
6
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iftc/yete",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"IFTC",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"dexie": "^4.3.0",
|
|
19
19
|
"esbuild": "^0.27.3",
|
|
20
|
-
"marked": "^17.0.5"
|
|
20
|
+
"marked": "^17.0.5",
|
|
21
|
+
"marked-katex-extension": "^5.1.8",
|
|
22
|
+
"katex": "^0.16.45"
|
|
21
23
|
}
|
|
22
24
|
}
|