Skip to content

Commit

Permalink
feat: 自定义文本颜色插件添加内部解析支持
Browse files Browse the repository at this point in the history
  • Loading branch information
boxsnake committed Jan 26, 2025
1 parent d0747d1 commit bd5d77a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vitepress/theme/apis/forum/gitee/issues.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiCall, labels } from '.'
import { apiCall } from '.'
import {
normalizeComment,
normalizeIssue,
Expand Down
6 changes: 3 additions & 3 deletions .vitepress/theme/markdown/customColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ function customColor(md: MarkdownIt): void {

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

// Create content token
const tokenContent = state.push('text', '', 0)
tokenContent.content = content
const tokenContent = state.push('html_inline', '', 0)
tokenContent.content = md.renderInline(content)

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

0 comments on commit bd5d77a

Please sign in to comment.