| 1441 | content.endsWith('};') || |
| 1442 | content.endsWith('>') || |
| 1443 | content.endsWith('>;') |
| 1444 | ? trimLastLine(content) |
| 1445 | : content; |
| 1446 | return '```ts\n' + unEscapeChars(trimmedContent) + '\n```'; |
| 1447 | } |
| 1448 | |
| 1449 | /** |
| 1450 | * Returns a heading in markdown format |
| 1451 | * @param level The level of the heading |
| 1452 | * @param text The text of the heading |
| 1453 | */ |
| 1454 | function heading(level, text) { |
| 1455 | level = level > 6 ? 6 : level; |
| 1456 | return `${[...Array(level)].map(() => '#').join('')} ${text}`; |
| 1457 | } |
| 1458 | |
| 1459 | function indentBlock(content) { |
| 1460 | const lines = content.split(`${'\n'}`); |