MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / markdownHarness

Function markdownHarness

src/artifacts/preview.ts:164–172  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

162}
163
164function markdownHarness(src: string): string {
165 const head = `<script src="${CDN.marked}"></script>`;
166 const body =
167 `<div id="__art_root" style="max-width:760px;margin:0 auto;padding:40px 24px;"></div>` +
168 `<script>\n` +
169 `document.getElementById('__art_root').innerHTML = window.marked ? marked.parse(${JSON.stringify(src)}) : ${JSON.stringify(escapeHtml(src))};\n` +
170 `</script>`;
171 return htmlShell(body, head);
172}
173
174/**
175 * Build a self-contained preview page for an artifact.

Callers 1

buildPreviewHtmlFunction · 0.85

Calls 2

htmlShellFunction · 0.85
escapeHtmlFunction · 0.70

Tested by

no test coverage detected