Issue #180 - fix indenting when -omit used

This commit is contained in:
Geoff McLane 2015-09-10 15:01:48 +02:00
parent e38bbe56a5
commit c48680cc01

View file

@ -2312,6 +2312,15 @@ void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node )
(TY_(nodeHasCM)(node, CM_HEAD) && !nodeIsTITLE(node)) ) (TY_(nodeHasCM)(node, CM_HEAD) && !nodeIsTITLE(node)) )
TY_(PFlushLineSmart)( doc, contentIndent ); TY_(PFlushLineSmart)( doc, contentIndent );
} }
else if ( ShouldIndent(doc, node) )
{
/*\
* Issue #180 - If the tag was NOT printed due to the -omit option,
* then reduce the bumped indent under the same ShouldIndent(doc, node)
* conditions that caused the indent to be bumped.
\*/
contentIndent -= spaces;
}
last = NULL; last = NULL;
for ( content = node->content; content; content = content->next ) for ( content = node->content; content; content = content->next )