From 6dff214ed72eb23122eb76bd2f0e23d79e482396 Mon Sep 17 00:00:00 2001 From: Chris Lahey Date: Wed, 1 Dec 1999 09:51:45 +0000 Subject: [PATCH] Made it so that html nodes with a single child do not insert a carriage * HTMLtree.c: Made it so that html nodes with a single child do not insert a carriage return before or after the child node. --- HTMLtree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/HTMLtree.c b/HTMLtree.c index a114e651..4b24f7d9 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -235,11 +235,13 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { } if (cur->childs != NULL) { if ((cur->childs->type != HTML_TEXT_NODE) && - (cur->childs->type != HTML_ENTITY_REF_NODE)) + (cur->childs->type != HTML_ENTITY_REF_NODE) && + (cur->childs != cur->last)) xmlBufferWriteChar(buf, "\n"); htmlNodeListDump(buf, doc, cur->childs); if ((cur->last->type != HTML_TEXT_NODE) && - (cur->last->type != HTML_ENTITY_REF_NODE)) + (cur->last->type != HTML_ENTITY_REF_NODE) && + (cur->childs != cur->last)) xmlBufferWriteChar(buf, "\n"); } xmlBufferWriteChar(buf, "