()
| 65 | let cancelled = false |
| 66 | |
| 67 | const highlight = async () => { |
| 68 | try { |
| 69 | const html = await highlightCode(children, language, themeId) |
| 70 | if (!cancelled) { |
| 71 | setHighlightedHtml(html) |
| 72 | } |
| 73 | } catch (error) { |
| 74 | console.error("Failed to highlight code:", error) |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | highlight() |
| 79 |
no test coverage detected