@commentray/render
v0.3.6
Published
Markdown + syntax highlighting rendering for Commentray
Downloads
2,646
Readme
@commentray/render
Markdown → HTML rendering stack for Commentray: remark-parse + remark-gfm (tables, task lists, strikethrough, autolink literals, footnotes), rehype-slug on headings, rehype-sanitize, rehype-highlight (lowlight), Mermaid containers, and ready-made HTML shells (side-by-side and a client-side interactive code browser with in-page token search).
Install
npm install @commentray/renderUse
import { renderSideBySideHtml } from "@commentray/render";
const html = await renderSideBySideHtml({
title: "src/example.ts",
code: sourceText,
language: "ts",
commentrayMarkdown: markdownText,
});The package ships a bundled browser client for the code-browser shell; no extra build step is required in your project.
