From 279c29bf8d7ad835f017d4d761629bfebfd7800f Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 10 Feb 2015 15:28:56 +0100 Subject: [PATCH 1/3] Issue #20 - revert to 880221e fix this issue --- src/parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 5ea4a5e..fa4c511 100644 --- a/src/parser.c +++ b/src/parser.c @@ -3921,7 +3921,10 @@ void TY_(ParseBody)(TidyDocImpl* doc, Node *body, GetTokenMode mode) if (TY_(nodeIsElement)(node)) { - if ( TY_(nodeHasCM)(node, CM_INLINE) && !TY_(nodeHasCM)(node, CM_MIXED) ) /* [i_a]2 add CM_MIXED */ + /* Issue #20 - merging from Ger Hobbelt fork put back CM_MIXED, which had been + removed to fix this issue - reverting to fix 880221e + */ + if ( TY_(nodeHasCM)(node, CM_INLINE) ) { /* HTML4 strict doesn't allow inline content here */ /* but HTML2 does allow img elements as children of body */ From 8b362b5f37392bd7be50366a6d2f20a1f3a98282 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 10 Feb 2015 15:30:35 +0100 Subject: [PATCH 2/3] bump point on revert to 880221e fix this issue #20 --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index b1a07f7..8fb1d7b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -4.9.13 \ No newline at end of file +4.9.14 \ No newline at end of file From ea50bd30e7678771e37f4a0c157c712574ebded6 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 10 Feb 2015 15:32:05 +0100 Subject: [PATCH 3/3] add comment only for potential fix of Issue #8 --- src/pprint.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pprint.c b/src/pprint.c index 2535e46..cdbd257 100644 --- a/src/pprint.c +++ b/src/pprint.c @@ -1985,6 +1985,10 @@ void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node ) else if ( TY_(nodeCMIsEmpty)(node) || (node->type == StartEndTag && !xhtml) ) { + /* Issue #8 - flush to new line? + maybe use if ( TY_(nodeHasCM)(node, CM_BLOCK) ) instead + or remove the CM_INLINE from the tag + */ if ( ! TY_(nodeHasCM)(node, CM_INLINE) ) PCondFlushLine( doc, indent );