feat(frontend): 添加 GitHub 代码块主题设置
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { highlightCode } from './markdown'
|
||||
|
||||
describe('Shiki GitHub 双主题', () => {
|
||||
it('一次渲染同时生成 GitHub Light 和 GitHub Dark 颜色变量', async () => {
|
||||
const html = await highlightCode('const answer = 42', 'typescript')
|
||||
|
||||
expect(html).toContain('github-light')
|
||||
expect(html).toContain('github-dark')
|
||||
expect(html).toContain('--shiki-light')
|
||||
expect(html).toContain('--shiki-dark')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user