From b704a4d0d4587c1dc428fcfdd01fa337c87cec3e Mon Sep 17 00:00:00 2001 From: Raphael Ackermann Date: Fri, 8 Apr 2016 23:08:56 +0200 Subject: [PATCH] allow zero LI in UL when html5. fix for #396 --- src/parser.c | 13 ++++++++----- src/tags.c | 9 +++++++++ src/tags.h | 1 + src/tidy-int.h | 2 ++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/parser.c b/src/parser.c index 0447fe8..ae773aa 100644 --- a/src/parser.c +++ b/src/parser.c @@ -328,7 +328,6 @@ static Bool CanPrune( TidyDocImpl* doc, Node *element ) if (nodeIsDD(element)) return no; - return yes; } @@ -2514,7 +2513,14 @@ void TY_(ParseList)(TidyDocImpl* doc, Node *list, GetTokenMode ARG_UNUSED(mode)) continue; } - if ( !nodeIsLI(node) ) + if ( nodeIsLI(node) || TY_(IsHTML5Mode)(doc)) + { + /* node is
  • + Issue #396 - A