(/** @type {string} */ name)
| 5960 | // "any other end tag" in body: pop to the matching open element, stopping at |
| 5961 | // the first special element; also the adoption agency's no-element fallback. |
| 5962 | const anyOtherEndTag = (/** @type {string} */ name) => { |
| 5963 | for (let i = open.length - 1; i >= 0; i--) { |
| 5964 | const node = open[i]; |
| 5965 | if (node.namespace === NS_HTML && node.tagName === name) { |
| 5966 | generateImpliedEndTags(name); |
| 5967 | while (open.length > i) { |
| 5968 | open[open.length - 1].end = tokenEnd; |
| 5969 | open.pop(); |
| 5970 | } |
| 5971 | return; |
| 5972 | } |
| 5973 | if (isSpecial(node)) return; |
| 5974 | } |
| 5975 | }; |
| 5976 | |
| 5977 | const startTagInBody = (/** @type {StartTagToken} */ t) => { |
| 5978 | const name = t.name; |
no test coverage detected