MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / renderSpan

Method renderSpan

src/common/terminal.ts:233–246  ·  view source on GitHub ↗
(span: StyledSpan)

Source from the content-addressed store, hash-verified

231/* @todo: Implement HTML terminal */
232class _HtmlTerminal extends Terminal {
233 renderSpan(span: StyledSpan): string {
234 let content =
235 typeof span.content === 'string'
236 ? span.content
237 : this.renderSpans(span.content);
238
239 if (span.italic) {
240 if (span.weight === 'bold') content = `<strong>${content}</strong>`;
241 else content = `<em>${content}</em>`;
242 } else if (span.weight === 'bold') content = `<strong>${content}</strong>`;
243
244 if (span.mono) content = `<code>${content}</code>`;
245 return content;
246 }
247 // display(s: TaggedText[]): void {}
248}
249

Callers

nothing calls this directly

Calls 1

renderSpansMethod · 0.80

Tested by

no test coverage detected