| 551 | `); |
| 552 | } |
| 553 | var S = class { |
| 554 | options; |
| 555 | rules; |
| 556 | lexer; |
| 557 | constructor(e) { |
| 558 | this.options = e || w; |
| 559 | } |
| 560 | space(e) { |
| 561 | let t = this.rules.block.newline.exec(e); |
| 562 | if (t && t[0].length > 0) return { type: "space", raw: t[0] }; |
| 563 | } |
| 564 | code(e) { |
| 565 | let t = this.rules.block.code.exec(e); |
| 566 | if (t) { |
| 567 | let n = t[0].replace(this.rules.other.codeRemoveIndent, ""); |
| 568 | return { |
| 569 | type: "code", |
| 570 | raw: t[0], |
| 571 | codeBlockStyle: "indented", |
| 572 | text: this.options.pedantic |
| 573 | ? n |
| 574 | : A( |
| 575 | n, |
| 576 | ` |
| 577 | `, |
| 578 | ), |
| 579 | }; |
| 580 | } |
| 581 | } |
| 582 | fences(e) { |
| 583 | let t = this.rules.block.fences.exec(e); |
| 584 | if (t) { |
| 585 | let n = t[0], |
| 586 | s = rt(n, t[3] || "", this.rules); |
| 587 | return { |
| 588 | type: "code", |
| 589 | raw: n, |
| 590 | lang: t[2] |
| 591 | ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") |
| 592 | : t[2], |
| 593 | text: s, |
| 594 | }; |
| 595 | } |
| 596 | } |
| 597 | heading(e) { |
| 598 | let t = this.rules.block.heading.exec(e); |
| 599 | if (t) { |
| 600 | let n = t[2].trim(); |
| 601 | if (this.rules.other.endingHash.test(n)) { |
| 602 | let s = A(n, "#"); |
| 603 | (this.options.pedantic || |
| 604 | !s || |
| 605 | this.rules.other.endingSpaceChar.test(s)) && |
| 606 | (n = s.trim()); |
| 607 | } |
| 608 | return { |
| 609 | type: "heading", |
| 610 | raw: t[0], |
nothing calls this directly
no test coverage detected