(spans: CodeSpan[], theme = DEFAULT_THEME)
| 335 | } |
| 336 | |
| 337 | function renderCode(spans: CodeSpan[], theme = DEFAULT_THEME): StyledSpan[] { |
| 338 | return spans.map((span) => { |
| 339 | const style = { ...theme[span.tag], content: span.content }; |
| 340 | return style; |
| 341 | }); |
| 342 | } |
| 343 | |
| 344 | /** Return a style span of the input code */ |
| 345 | export function highlightCodeSpan( |
no test coverage detected