CH4ACKO3/dsh-render-engine--packages-code-render ↗★ 0
@ch4acko3/dsh-code-render
Safe HTML code rendering service for DeepSeek Harness Web plugins
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CH4ACKO3/dsh-render-engine#8401d60319cc256b73167e14460c12cec647db4f&path:packages/code-render说明文档
阅读完整 README ↗@ch4acko3/dsh-code-render
A browser-side Cordis service that renders ctx.syntaxHighlighter tokens as safe, theme-aware HTML code blocks.
export const inject = ['codeRenderer']
export function apply(ctx) {
const result = ctx.codeRenderer.render({
code: 'const answer = 42',
language: 'ts',
})
console.log(result.html)
}
Source text and HTML attributes are escaped. Colors follow DSH's --shiki-* CSS variables, and original LF, CRLF, or CR line endings are retained.