(src: string)
| 590 | } |
| 591 | |
| 592 | paragraph(src: string): Tokens.Paragraph | undefined { |
| 593 | const cap = this.rules.block.paragraph.exec(src); |
| 594 | if (cap) { |
| 595 | const text = cap[1].charAt(cap[1].length - 1) === '\n' |
| 596 | ? cap[1].slice(0, -1) |
| 597 | : cap[1]; |
| 598 | return { |
| 599 | type: 'paragraph', |
| 600 | raw: cap[0], |
| 601 | text, |
| 602 | tokens: this.lexer.inline(text), |
| 603 | }; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | text(src: string): Tokens.Text | undefined { |
| 608 | const cap = this.rules.block.text.exec(src); |