Handle message outlook properly in messageOut().

This commit is contained in:
Jim Derry 2017-08-31 10:44:16 -04:00
parent 5cd2603a68
commit e1cbafd647

View file

@ -167,6 +167,12 @@ static void messageOut( TidyMessageImpl *message )
go = go & (cfgBool(doc, TidyShowInfo) == yes); go = go & (cfgBool(doc, TidyShowInfo) == yes);
} }
/* If suppressing TidyWarning on Reports, suppress them. */
if ( message->level == TidyWarning )
{
go = go & (cfgBool(doc, TidyShowWarnings) == yes);
}
/* If we're TidyQuiet and handling TidyDialogue, then suppress. */ /* If we're TidyQuiet and handling TidyDialogue, then suppress. */
if ( cfgBool(doc, TidyQuiet) ) if ( cfgBool(doc, TidyQuiet) )
{ {
@ -378,10 +384,6 @@ void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code)
} }
messageOut( message ); messageOut( message );
/* Although the callback is always executed for message2, it's only
added to the output sink TidyShowWarnings is enabled. */
if (cfgBool( doc, TidyShowWarnings ))
messageOut( message2 ); messageOut( message2 );
} }