(code: string)
| 9 | } |
| 10 | |
| 11 | function createBuzzCodeBlockHtml(code: string) { |
| 12 | // Keep the code as one text node; the paste reader recovers it via textContent. |
| 13 | return `<pre ${BUZZ_CODE_BLOCK_ATTRIBUTE}="true"><code>${escapeHtml(code)}</code></pre>`; |
| 14 | } |
| 15 | |
| 16 | export async function copyCodeBlockToClipboard(code: string) { |
| 17 | const clipboard = navigator.clipboard; |
no test coverage detected