Description
Experimenting with this tidy-json app using the TidyMessageCallback
API, have turned up some bugs, using the current 5.7.3 libtidy
...
The first is it appears the tidyGetMessageIsMuted(tmessage)
member is not initialized until after this callback
is fired...
This looks like a simple case that this code should be done before the callback
is done... in fact seems no reason why it is not done near the top of the tidyMessageCreateInitV
internal static function...
The second is concerning languages
. When libtidy
is set to output messages in currently available translations
, in some cases the default text can contain some of the translated
text...
For example running with option -lang fr
, and assume this would be the same in a native French system, but that not tested, while most message have English in the "messageDefault":
, and French in the "messageLang":
some are a strange mixture like -
"messageDefault": "texte brut isn't allowed in <head> elements",
"messageLang": "texte brut n'est pas permis dans les éléments <head>"
and
"messageDefault": "Tidy found 4 avertissements and 0 erreur!\n",
"messageLang": "Tidy a trouvé 4 avertissements et 0 erreur!\n"
Of course, run in the default English mode those, and all others, are the same English only, as expected -
"messageDefault": "plain text isn't allowed in <head> elements",
"messageLang": "plain text isn't allowed in <head> elements"
and
"messageDefault": "Tidy found 4 warnings and 0 errors!\n",
"messageLang": "Tidy found 4 warnings and 0 errors!\n"
Quite puzzling!
These test were run using in_704.html as the input file...
Any help, feedback, patches, or PR very welcome on either of these two issues... thanks...