Skip to content

Commit bd5d77a

Browse files
committed
feat: 自定义文本颜色插件添加内部解析支持
1 parent d0747d1 commit bd5d77a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.vitepress/theme/apis/forum/gitee/issues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { apiCall, labels } from '.'
1+
import { apiCall } from '.'
22
import {
33
normalizeComment,
44
normalizeIssue,

.vitepress/theme/markdown/customColor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function customColor(md: MarkdownIt): void {
2020

2121
// Create opening tag token
2222
const tokenOpen = state.push('html_inline', '', 0)
23-
tokenOpen.content = `<span style=\"color:${color}\">`
23+
tokenOpen.content = `<span style="color:${color}">`
2424

2525
// Create content token
26-
const tokenContent = state.push('text', '', 0)
27-
tokenContent.content = content
26+
const tokenContent = state.push('html_inline', '', 0)
27+
tokenContent.content = md.renderInline(content)
2828

2929
// Create closing tag token
3030
const tokenClose = state.push('html_inline', '', 0)

0 commit comments

Comments
 (0)