(src: string)
| 162 | } |
| 163 | |
| 164 | function 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. |
no test coverage detected