()
| 66 | } |
| 67 | |
| 68 | parseHeading(): TaggedBlock { |
| 69 | let level = 1; |
| 70 | while (!this.atEnd() && this.peek() === '#' && level < 3) { |
| 71 | this.consume(); |
| 72 | level++; |
| 73 | } |
| 74 | this.skipWhitespace(); |
| 75 | const content = this.readUntil('\n'); |
| 76 | const contentParsed = parseSpan(content.trim()); |
| 77 | const tag: BlockTag = `h${level}` as 'h1' | 'h2' | 'h3'; |
| 78 | return { |
| 79 | tag, |
| 80 | content: contentParsed, |
| 81 | }; |
| 82 | } |
| 83 | |
| 84 | parseBlockquote(): TaggedBlock { |
| 85 | const contentLines: string[] = []; |
no test coverage detected