(text: string)
| 26 | }; |
| 27 | |
| 28 | const escapeHtml = (text: string) => { |
| 29 | const div = document.createElement('div'); |
| 30 | div.textContent = text; |
| 31 | return div.innerHTML; |
| 32 | }; |
| 33 | |
| 34 | const highlightSyntax = (code: string) => { |
| 35 | const escaped = escapeHtml(code); |