From b9d1e1f037081d8350071e11399025713b7563c2 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Mon, 20 Mar 2017 16:54:50 +0100 Subject: [PATCH] Issue #333 - create exception for span/meta --- src/parser.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/parser.c b/src/parser.c index dd9d11e..9023ba6 100644 --- a/src/parser.c +++ b/src/parser.c @@ -2149,9 +2149,17 @@ void TY_(ParseInline)( TidyDocImpl* doc, Node *element, GetTokenMode mode ) } } - /* block level tags end this element */ + /*\ + * block level tags end this element + * Issue #333 - There seems an exception if the element is a 'span', + * and the node just collected is a 'meta'. The 'meta' can not have + * CM_INLINE added, nor can the 'span' have CM_MIXED added without + * big consequences. + * There may be other exceptions to be added... + \*/ if (!(node->tag->model & CM_INLINE) && - !(element->tag->model & CM_MIXED)) + !(element->tag->model & CM_MIXED) && + !(nodeIsSPAN(element) && nodeIsMETA(node)) ) { if ( !TY_(nodeIsElement)(node) ) {