MCPcopy Create free account
hub / github.com/Kitware/VTK / htmlAutoClose

Function htmlAutoClose

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:1478–1490  ·  view source on GitHub ↗

* htmlAutoClose: * @ctxt: an HTML parser context * @newtag: The new tag name or NULL * * The HTML DTD allows a tag to implicitly close other tags. * The list is kept in htmlStartClose array. This function is * called when a new tag has been detected and generates the * appropriates closes if possible/needed. * If newtag is NULL this mean we are at the end of the resource * and we should

Source from the content-addressed store, hash-verified

1476 * and we should check
1477 */
1478static void
1479htmlAutoClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag)
1480{
1481 if (newtag == NULL)
1482 return;
1483
1484 while ((ctxt->name != NULL) &&
1485 (htmlCheckAutoClose(newtag, ctxt->name))) {
1486 if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
1487 ctxt->sax->endElement(ctxt->userData, ctxt->name);
1488 htmlnamePop(ctxt);
1489 }
1490}
1491
1492/**
1493 * htmlAutoCloseTag:

Callers 4

htmlCheckParagraphFunction · 0.85
htmlParseStartTagFunction · 0.85
htmlParseContentFunction · 0.85
htmlParseContentInternalFunction · 0.85

Calls 2

htmlCheckAutoCloseFunction · 0.85
htmlnamePopFunction · 0.85

Tested by

no test coverage detected