endTagHeading method
void
endTagHeading(
- EndTagToken token
Implementation
void endTagHeading(EndTagToken token) {
for (var item in headingElements) {
if (tree.elementInScope(item)) {
tree.generateImpliedEndTags();
break;
}
}
if (tree.openElements.last.localName != token.name) {
parser.parseError(token.span, 'end-tag-too-early', {'name': token.name});
}
for (var item in headingElements) {
if (tree.elementInScope(item)) {
var node = tree.openElements.removeLast();
while (!headingElements.contains(node.localName)) {
node = tree.openElements.removeLast();
}
node.endSourceSpan = token.span;
break;
}
}
}