Issue #582 - Remove extra new line in 'classic' mode
This commit is contained in:
parent
fa18c51871
commit
f7658b2c89
|
@ -2340,7 +2340,8 @@ void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node )
|
||||||
else /* other tags */
|
else /* other tags */
|
||||||
{
|
{
|
||||||
Bool indcont = ( cfgAutoBool(doc, TidyIndentContent) != TidyNoState );
|
Bool indcont = ( cfgAutoBool(doc, TidyIndentContent) != TidyNoState );
|
||||||
Bool indsmart = ( cfgAutoBool(doc, TidyIndentContent) == TidyAutoState );
|
/* Issue #582 - Seems this is no longer used
|
||||||
|
Bool indsmart = ( cfgAutoBool(doc, TidyIndentContent) == TidyAutoState ); */
|
||||||
Bool hideend = cfgBool( doc, TidyOmitOptionalTags );
|
Bool hideend = cfgBool( doc, TidyOmitOptionalTags );
|
||||||
Bool classic = TidyClassicVS; /* #228 - cfgBool( doc, TidyVertSpace ); */
|
Bool classic = TidyClassicVS; /* #228 - cfgBool( doc, TidyVertSpace ); */
|
||||||
uint contentIndent = indent;
|
uint contentIndent = indent;
|
||||||
|
@ -2360,9 +2361,11 @@ void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node )
|
||||||
* Issue #180 - with the above PCondFlushLine,
|
* Issue #180 - with the above PCondFlushLine,
|
||||||
* this adds an uneccessary additional line!
|
* this adds an uneccessary additional line!
|
||||||
* Maybe only if 'classic' ie --vertical-space yes
|
* Maybe only if 'classic' ie --vertical-space yes
|
||||||
|
* Issue #582 - maybe this is no longer needed!
|
||||||
|
* It adds a 3rd newline if indent: auto...
|
||||||
|
* if ( indsmart && node->prev != NULL && classic)
|
||||||
|
* TY_(PFlushLineSmart)( doc, indent );
|
||||||
\*/
|
\*/
|
||||||
if ( indsmart && node->prev != NULL && classic)
|
|
||||||
TY_(PFlushLineSmart)( doc, indent );
|
|
||||||
|
|
||||||
/* do not omit elements with attributes */
|
/* do not omit elements with attributes */
|
||||||
if ( !hideend || !TY_(nodeHasCM)(node, CM_OMITST) ||
|
if ( !hideend || !TY_(nodeHasCM)(node, CM_OMITST) ||
|
||||||
|
|
Loading…
Reference in a new issue