MCPcopy
hub / github.com/webpack/webpack / emitOpenTag

Function emitOpenTag

lib/html/syntax.js:551–571  ·  view source on GitHub ↗
(endPos, selfClosing)

Source from the content-addressed store, hash-verified

549 * @returns {number} next position
550 */
551 const emitOpenTag = (endPos, selfClosing) => {
552 let nextPos = endPos;
553 if (callbacks.openTag !== undefined) {
554 nextPos = callbacks.openTag(
555 input,
556 tagStart,
557 endPos,
558 tagNameStart,
559 tagNameEnd,
560 selfClosing
561 );
562 }
563 if (!selfClosing) {
564 // Record offsets only; `contentModeAfterOpenTag` lowercases lazily.
565 lastOpenTagStart = tagNameStart;
566 lastOpenTagEnd = tagNameEnd;
567 }
568 tagHasAttributes = false;
569 textStart = nextPos;
570 return nextPos;
571 };
572
573 /**
574 * @param {number} endPos end position

Callers 1

walkHtmlTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected