(spans: TaggedSpan[])
| 141 | } |
| 142 | |
| 143 | export function renderSpan(spans: TaggedSpan[]): StyledSpan[] { |
| 144 | const styled: StyledSpan[] = []; |
| 145 | for (const span of spans) { |
| 146 | if (span.tag === 'b') styled.push({ weight: 'bold', content: span.s }); |
| 147 | else if (span.tag === 'i') styled.push({ italic: true, content: span.s }); |
| 148 | else if (span.tag === 'em') |
| 149 | styled.push({ italic: true, weight: 'bold', content: span.s }); |
| 150 | else if (span.tag === 'code') |
| 151 | styled.push({ mono: true, fg: 'yellow', content: span.s }); |
| 152 | else styled.push({ content: span.s }); |
| 153 | } |
| 154 | return styled; |
| 155 | } |
nothing calls this directly
no outgoing calls
no test coverage detected