Is #719 - Set 'muted' before any callback

This commit is contained in:
Geoff McLane 2018-04-26 14:20:14 +02:00
parent 0606b0201a
commit a4600ac5b0

View file

@ -96,6 +96,18 @@ static TidyMessageImpl *tidyMessageCreateInitV( TidyDocImpl *doc,
result->line = line; result->line = line;
result->column = column; result->column = column;
result->level = level; result->level = level;
/* Is #719 - set 'muted' before any callbacks. */
result->muted = no;
i = 0;
while ((doc->muted.list) && (doc->muted.list[i] != 0))
{
if (doc->muted.list[i] == code)
{
result->muted = yes;
break;
}
i++;
}
/* Things we create... */ /* Things we create... */
@ -208,19 +220,6 @@ static TidyMessageImpl *tidyMessageCreateInitV( TidyDocImpl *doc,
result->allowMessage = result->allowMessage & doc->messageCallback( tidyImplToMessage(result) ); result->allowMessage = result->allowMessage & doc->messageCallback( tidyImplToMessage(result) );
} }
/* finally, check the document's configuration to determine whether
this message is muted. */
result->muted = no;
while ( ( doc->muted.list ) && ( doc->muted.list[i] != 0 ) )
{
if ( doc->muted.list[i] == code )
{
result->muted = yes;
break;
}
i++;
}
return result; return result;
} }