MCPcopy Create free account
hub / github.com/fb55/htmlparser2 / closeCurrentTag

Method closeCurrentTag

src/Parser.ts:534–542  ·  view source on GitHub ↗
(isOpenImplied: boolean)

Source from the content-addressed store, hash-verified

532 }
533
534 private closeCurrentTag(isOpenImplied: boolean) {
535 const name = this.tagname;
536 this.endOpenTag(isOpenImplied);
537
538 // Self-closing tags will be on the top of the stack
539 if (this.stack[0] === name) {
540 this.popElement(!isOpenImplied);
541 }
542 }
543
544 /**
545 * @param start Start index for the current parser event.

Callers 2

onclosetagMethod · 0.95
onselfclosingtagMethod · 0.95

Calls 2

endOpenTagMethod · 0.95
popElementMethod · 0.95

Tested by

no test coverage detected