memorax-ai/dsh-render-engine--packages-code-render ↗★ 1

@ch4acko3/dsh-code-render

Safe HTML code rendering service for DeepSeek Harness Web plugins 适合需要在Web插件中安全、美观地展示高亮代码块的开发者。

パッケージ
@ch4acko3/dsh-code-render
互換性
未検証
Cordis ピア範囲
^4.0.1
バージョン
0.1.3
ライセンス
MIT
最終更新
2026/09/24

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:memorax-ai/dsh-render-engine#9582bf138d3a6d7381a84359a4a0b878a1ea8952&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.