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

Function htmlCheckParagraph

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:1621–1650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1619 */
1620
1621static int
1622htmlCheckParagraph(htmlParserCtxtPtr ctxt) {
1623 const xmlChar *tag;
1624 int i;
1625
1626 if (ctxt == NULL)
1627 return(-1);
1628 tag = ctxt->name;
1629 if (tag == NULL) {
1630 htmlAutoClose(ctxt, BAD_CAST"p");
1631 htmlCheckImplied(ctxt, BAD_CAST"p");
1632 htmlnamePush(ctxt, BAD_CAST"p");
1633 if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL))
1634 ctxt->sax->startElement(ctxt->userData, BAD_CAST"p", NULL);
1635 return(1);
1636 }
1637 if (!htmlOmittedDefaultValue)
1638 return(0);
1639 for (i = 0; htmlNoContentElements[i] != NULL; i++) {
1640 if (xmlStrEqual(tag, BAD_CAST htmlNoContentElements[i])) {
1641 htmlAutoClose(ctxt, BAD_CAST"p");
1642 htmlCheckImplied(ctxt, BAD_CAST"p");
1643 htmlnamePush(ctxt, BAD_CAST"p");
1644 if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL))
1645 ctxt->sax->startElement(ctxt->userData, BAD_CAST"p", NULL);
1646 return(1);
1647 }
1648 }
1649 return(0);
1650}
1651
1652/**
1653 * htmlIsScriptAttribute:

Callers 3

htmlParseReferenceFunction · 0.85
htmlParseTryOrFinishFunction · 0.85

Calls 3

htmlAutoCloseFunction · 0.85
htmlCheckImpliedFunction · 0.85
xmlStrEqualFunction · 0.85

Tested by

no test coverage detected