MCPcopy
hub / github.com/webpack/webpack / emitCloseTag

Function emitCloseTag

lib/html/syntax.js:577–595  ·  view source on GitHub ↗
(endPos)

Source from the content-addressed store, hash-verified

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);

Callers 1

walkHtmlTokensFunction · 0.85

Calls 1

reportErrorFunction · 0.70

Tested by

no test coverage detected