()
| 41 | } |
| 42 | |
| 43 | parseBlock(): TaggedBlock | null { |
| 44 | this.skipWhitespace(); |
| 45 | |
| 46 | if (this.match('#')) { |
| 47 | return this.parseHeading(); |
| 48 | } else if (this.match('>')) { |
| 49 | return this.parseBlockquote(); |
| 50 | } else if (this.match('```')) { |
| 51 | return this.parseCodeBlock(); |
| 52 | } else if (this.match(':::')) { |
| 53 | return this.parseCallout(); |
| 54 | } else if ( |
| 55 | this.peek() === '*' || |
| 56 | this.peek() === '-' || |
| 57 | this.peek() === '+' || |
| 58 | this.isDigit(this.peek()) |
| 59 | ) { |
| 60 | return this.parseList(); |
| 61 | } else if (this.peek() === '|') { |
| 62 | return this.parseTable(); |
| 63 | } else { |
| 64 | return this.parseParagraph(); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | parseHeading(): TaggedBlock { |
| 69 | let level = 1; |
no test coverage detected