(token: BlockCloseToken)
| 639 | } |
| 640 | |
| 641 | private _consumeBlockClose(token: BlockCloseToken) { |
| 642 | const initialStackLength = this._containerStack.length; |
| 643 | const topNode = this._containerStack[initialStackLength - 1]; |
| 644 | if (!this._popContainer(null, html.Block, token.sourceSpan)) { |
| 645 | if (this._containerStack.length < initialStackLength) { |
| 646 | const nodeName = topNode.name; |
| 647 | this.errors.push( |
| 648 | TreeError.create( |
| 649 | null, |
| 650 | token.sourceSpan, |
| 651 | `Unexpected closing block. The block may have been closed earlier. ` + |
| 652 | `Did you forget to close the <${nodeName}> element? ` + |
| 653 | `If you meant to write the \`}\` character, you should use the "}" ` + |
| 654 | `HTML entity instead.`, |
| 655 | ), |
| 656 | ); |
| 657 | return; |
| 658 | } |
| 659 | |
| 660 | this.errors.push( |
| 661 | TreeError.create( |
| 662 | null, |
| 663 | token.sourceSpan, |
| 664 | `Unexpected closing block. The block may have been closed earlier. ` + |
| 665 | `If you meant to write the \`}\` character, you should use the "}" ` + |
| 666 | `HTML entity instead.`, |
| 667 | ), |
| 668 | ); |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | private _consumeIncompleteBlock(token: IncompleteBlockOpenToken) { |
| 673 | const parameters: html.BlockParameter[] = []; |
no test coverage detected