(block: TaggedHeading)
| 326 | } |
| 327 | |
| 328 | function renderHeading(block: TaggedHeading): StyledBlock { |
| 329 | if (block.tag === 'h1') { |
| 330 | return { |
| 331 | tag: 'paragraph', |
| 332 | spans: renderSpans( |
| 333 | block.content.map((span) => ({ |
| 334 | ...span, |
| 335 | s: span.s.toUpperCase(), |
| 336 | fg: 'blue', |
| 337 | })) |
| 338 | ), |
| 339 | }; |
| 340 | } |
| 341 | |
| 342 | if (block.tag === 'h2') { |
| 343 | return { |
| 344 | tag: 'paragraph', |
| 345 | spans: renderSpans( |
| 346 | block.content.map((span) => ({ |
| 347 | ...span, |
| 348 | s: span.s.toUpperCase(), |
| 349 | fg: 'bright-blue', |
| 350 | })) |
| 351 | ), |
| 352 | }; |
| 353 | } |
| 354 | |
| 355 | return { |
| 356 | tag: 'paragraph', |
| 357 | spans: renderSpans(block.content), |
| 358 | }; |
| 359 | } |
| 360 | |
| 361 | function renderBlockquote(block: TaggedBlockQuote): StyledBlock { |
| 362 | return { |
no test coverage detected