From 346ba063c98f7fdcd98343ba100344854c943ef8 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Sun, 8 Oct 2017 12:03:48 -0400 Subject: [PATCH] Expose the new property to the public API. --- include/tidy.h | 11 ++++++++++- src/tidylib.c | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/tidy.h b/include/tidy.h index 365c70d..59c5609 100644 --- a/include/tidy.h +++ b/include/tidy.h @@ -1243,7 +1243,16 @@ TIDY_EXPORT int TIDY_CALL tidyGetMessageColumn( TidyMessage tmessage ); ** message. */ TIDY_EXPORT TidyReportLevel TIDY_CALL tidyGetMessageLevel( TidyMessage tmessage ); - + + +/** Get the squelched status of the message, that is, whether or not the + ** current configuration indicated that this message should be muted. + ** @param tmessage Specify the message that you are querying. + ** @result Returns a Bool indicating that the config indicates muting this + ** message. + */ +TIDY_EXPORT Bool TIDY_CALL tidyGetMessageIsSquelched( TidyMessage tmessage ); + /** Get the default format string, which is the format string for the message ** in Tidy's default localization (en_us). ** @param tmessage Specify the message that you are querying. diff --git a/src/tidylib.c b/src/tidylib.c index 1c57c41..2bc7c08 100644 --- a/src/tidylib.c +++ b/src/tidylib.c @@ -715,7 +715,11 @@ TidyReportLevel TIDY_CALL tidyGetMessageLevel( TidyMessage tmessage ) return TY_(getMessageLevel)(*message); } - +Bool TIDY_CALL tidyGetMessageIsSquelched( TidyMessage tmessage ) +{ + TidyMessageImpl *message = tidyMessageToImpl(tmessage); + return TY_(getMessageIsSquelched)(*message); +} ctmbstr TIDY_CALL tidyGetMessageFormatDefault( TidyMessage tmessage ) {