(text: string)
| 2 | |
| 3 | // Utility to use more human-readable strings in tests |
| 4 | function escapeHtml(text: string): string { |
| 5 | return text |
| 6 | .replace(/&/g, '&') |
| 7 | .replace(/</g, '<') |
| 8 | .replace(/>/g, '>') |
| 9 | .replace(/"/g, '"') |
| 10 | .replace(/'/g, ''') |
| 11 | } |
| 12 | |
| 13 | describe('useMarkdown', () => { |
| 14 | describe('plain text', () => { |