* 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
| 1476 | * and we should check |
| 1477 | */ |
| 1478 | static void |
| 1479 | htmlAutoClose(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: |
no test coverage detected