(endPos)
| 575 | * @returns {number} next position |
| 576 | */ |
| 577 | const emitCloseTag = (endPos) => { |
| 578 | // Per WHATWG: an end tag emitted with attributes is a parse error. |
| 579 | if (tagHasAttributes) { |
| 580 | reportError("end-tag-with-attributes", tagStart, endPos, "warning"); |
| 581 | } |
| 582 | let nextPos = endPos; |
| 583 | if (callbacks.closeTag !== undefined) { |
| 584 | nextPos = callbacks.closeTag( |
| 585 | input, |
| 586 | tagStart, |
| 587 | endPos, |
| 588 | tagNameStart, |
| 589 | tagNameEnd |
| 590 | ); |
| 591 | } |
| 592 | tagHasAttributes = false; |
| 593 | textStart = nextPos; |
| 594 | return nextPos; |
| 595 | }; |
| 596 | |
| 597 | while (pos < len) { |
| 598 | const cc = input.charCodeAt(pos); |
no test coverage detected