-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: renderer upgrade to ts (#379)
* refactor: renderer upgrade to ts * fix: options of katex * fix: render of katex * chore: update marked-katex-extension to version 5.1.2 * chore: build theme * chore: update renderer * feat: move build addition func * chore: styled content * chore: update renderer * chore: update packages * chore: update renderer * fix: logic of merged * chore: update renderer * chore: update * feat: add token type * feat: add styles func * chore: update renderer * fix: parse table cell * feat: horizontal table scrolling is supported * fix: strong tag * feat: parse strong and em label * fix: parse list * chore: update example docs * chore: update --------- Co-authored-by: Libin YANG <[email protected]>
- Loading branch information
Showing
10 changed files
with
529 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,10 @@ | |
rel="apple-touch-icon-precomposed" | ||
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png" | ||
/> | ||
<!-- <link | ||
rel="stylesheet" | ||
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/wechatsync/article-syncjs@latest/dist/styles.css" | ||
/> --> | ||
<!-- KaTeX CSS --> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/[email protected].9/dist/katex.min.css" | ||
integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" | ||
href="https://cdn.jsdelivr.net/npm/[email protected].11/dist/katex.min.css" | ||
integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" | ||
crossorigin="anonymous" | ||
/> | ||
<style> | ||
|
@@ -104,7 +99,6 @@ | |
} | ||
</script> | ||
<script type="module" src="/src/main.js"></script> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/wechatsync/article-syncjs@latest/dist/main.js"></script> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,11 @@ Markdown 是一种轻量级标记语言,用于格式化纯文本。它以简 | |
|
||
```markdown | ||
# 一级标题 | ||
|
||
## 二级标题 | ||
|
||
### 三级标题 | ||
|
||
#### 四级标题 | ||
``` | ||
|
||
|
@@ -23,12 +26,12 @@ Markdown 是一种轻量级标记语言,用于格式化纯文本。它以简 | |
### 2. 段落与换行:自然流畅 | ||
|
||
Markdown 中的段落就是一行接一行的文本。要创建新段落,只需在两行文本之间空一行。 | ||
Markdown 中的段落就是一行接一行的文本。要创建新段落,只需在两行文本之间空一行。 | ||
|
||
### 3. 字体样式:强调你的文字 | ||
|
||
- **粗体**:用两个星号或下划线包裹文字,如 `**粗体**` 或 `__粗体__`。 | ||
- *斜体*:用一个星号或下划线包裹文字,如 `*斜体*` 或 `_斜体_`。 | ||
- _斜体_:用一个星号或下划线包裹文字,如 `*斜体*` 或 `_斜体_`。 | ||
- ~~删除线~~:用两个波浪线包裹文字,如 `~~删除线~~`。 | ||
|
||
这些简单的标记可以让你的内容更有层次感和重点突出。 | ||
|
@@ -41,8 +44,8 @@ Markdown 中的段落就是一行接一行的文本。要创建新段落,只 | |
在列表中嵌套其他内容?只需缩进即可实现嵌套效果。 | ||
|
||
- 无序列表项 1 | ||
1. 嵌套有序列表项 1 | ||
2. 嵌套有序列表项 2 | ||
1. 嵌套有序列表项 1 | ||
2. 嵌套有序列表项 2 | ||
- 无序列表项 2 | ||
|
||
1. 有序列表项 1 | ||
|
@@ -53,9 +56,9 @@ Markdown 中的段落就是一行接一行的文本。要创建新段落,只 | |
- **链接**:用方括号和圆括号创建链接 `[显示文本](链接地址)`。 | ||
- **图片**:和链接类似,只需在前面加上 `!`,如 `![描述文本](图片链接)`。 | ||
|
||
[访问 Google](https://www.google.com) | ||
[访问 Doocs](https://github.com/doocs) | ||
|
||
![Markdown Logo](https://markdown-here.com/img/icon256.png) | ||
![doocs](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/logo-2.png) | ||
|
||
轻松实现富媒体内容展示! | ||
|
||
|
@@ -68,7 +71,8 @@ Markdown 中的段落就是一行接一行的文本。要创建新段落,只 | |
使用 `>` 来创建引用,只需在文本前面加上它。多层引用?在前一层 `>` 后再加一个就行。 | ||
|
||
> 这是一个引用 | ||
>> 这是一个嵌套引用 | ||
> | ||
> > 这是一个嵌套引用 | ||
这让你的引用更加富有层次感。 | ||
|
||
|
@@ -78,7 +82,7 @@ Markdown 中的段落就是一行接一行的文本。要创建新段落,只 | |
- **代码块**:用三个反引号包裹,并指定语言,如: | ||
|
||
```js | ||
console.log("Hello, Markdown!"); | ||
console.log("Hello, Doocs!"); | ||
``` | ||
|
||
语法高亮让你的代码更易读。 | ||
|
@@ -95,10 +99,11 @@ console.log("Hello, Markdown!"); | |
|
||
Markdown 支持简单的表格,用 `|` 和 `-` 分隔单元格和表头。 | ||
|
||
| 名称 | 年龄 | 职业 | | ||
| ------ | ---- | ------ | | ||
| 小明 | 25 | 开发者 | | ||
| 小红 | 24 | 设计师 | | ||
| 项目人员 | 邮箱 | 微信号 | | ||
| ------------------------------------------- | ---------------------- | ------------ | | ||
| [yanglbme](https://github.com/yanglbme) | [email protected] | YLB0109 | | ||
| [YangFong](https://github.com/YangFong) | [email protected] | yq2419731931 | | ||
| [thinkasany](https://github.com/thinkasany) | [email protected] | thinkasany | | ||
|
||
这样的表格让数据展示更为清爽! | ||
|
||
|
@@ -129,10 +134,10 @@ $$ | |
Mermaid 是强大的可视化工具,可以在 Markdown 中创建流程图、时序图等。 | ||
|
||
```mermaid | ||
graph TD; | ||
A-->B; | ||
A-->C; | ||
B-->D; | ||
graph TD; | ||
A-->B; | ||
A-->C; | ||
B-->D; | ||
C-->D; | ||
``` | ||
|
||
|
@@ -173,8 +178,6 @@ Markdown 是一种简单、强大且易于掌握的标记语言,通过学习 | |
|
||
--- | ||
|
||
欢迎关注我的公众号“**Doocs**”,原创技术文章第一时间推送。 | ||
|
||
<center> | ||
<img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png" style="width: 100px;"> | ||
</center> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.