shiki 代码高亮变换器测试
shiki 代码高亮变换器测试
transformerNotationDiff
使用 [!code ++] 和 [!code --] 来标记增删的行。
console.log('hewwo')
console.log('hello')
console.log('goodbye')transformerNotationHighlight
使用 [!code highlight] 来高亮显示行:
console.log('Not highlighted')
console.log('Highlighted')
console.log('Not highlighted')transformerNotationFocus
使用 [!code focus] 来聚焦显示行:
console.log('Not focused');
console.log('Focused')
console.log('Not focused');transformerNotationErrorLevel
使用 [!code error] 和 [!code warning] 来指定行的日志等级:
console.log('No errors or warnings')
console.error('Error')
console.warn('Warning') shiki 代码高亮变换器测试
https://simonkimi.githubio.io/2026/03/05/shiki-代码高亮变换器测试/