diff --git a/include/tidyenum.h b/include/tidyenum.h index d99713b..f253942 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -108,6 +108,7 @@ typedef enum TidyOutFile, /**< File name to write markup to */ TidyWriteBack, /**< If true then output tidied markup */ TidyShowMarkup, /**< If false, normal output is suppressed */ + TidyShowInfo, /**< If true, info-level messages are shown */ TidyShowWarnings, /**< However errors are always shown */ TidyQuiet, /**< No 'Parsing X', guessed DTD or summary */ TidyIndentContent, /**< Indent content of appropriate tags */ diff --git a/index.html b/index.html index 81d83ae..47b186b 100644 --- a/index.html +++ b/index.html @@ -376,6 +376,7 @@ configuration options:
  • drop-empty-elements
  • merge-emphasis
  • omit-optional-tags +
  • show-info

    In addition, it also adds a new html5 value for the doctype diff --git a/quickref.html b/quickref.html index 61f3c29..4fdc5d3 100644 --- a/quickref.html +++ b/quickref.html @@ -8,7 +8,7 @@

    Quick Reference

    HTML Tidy Configuration Options

    -

    Version: https://github.com/w3c/tidy-html5/tree/abc1e3f

    +

    Version: https://github.com/w3c/tidy-html5/tree/1f21625

    HTML, XHTML, XML
    @@ -448,6 +448,13 @@ Integer 6 + + + show-info + + Boolean + yes + show-warnings @@ -1763,6 +1770,23 @@   + + show-info + + Top + + + + Type: Boolean
    + Default: yes
    Example: y/n, yes/no, t/f, true/false, 1/0 + + + + This option specifies if Tidy should display info-level messages. + + +   + show-warnings diff --git a/src/config.c b/src/config.c index 26309d2..f557e71 100644 --- a/src/config.c +++ b/src/config.c @@ -236,6 +236,7 @@ static const TidyOptionImpl option_defs[] = { TidyOutFile, MS, "output-file", ST, 0, ParseString, NULL }, { TidyWriteBack, MS, "write-back", BL, no, ParseBool, boolPicks }, { TidyShowMarkup, PP, "markup", BL, yes, ParseBool, boolPicks }, + { TidyShowInfo, DG, "show-info", BL, yes, ParseBool, boolPicks }, { TidyShowWarnings, DG, "show-warnings", BL, yes, ParseBool, boolPicks }, { TidyQuiet, MS, "quiet", BL, no, ParseBool, boolPicks }, { TidyIndentContent, PP, "indent", IN, TidyNoState, ParseAutoBool, autoBoolPicks }, diff --git a/src/localize.c b/src/localize.c index 6c9cf04..d62fa07 100644 --- a/src/localize.c +++ b/src/localize.c @@ -681,6 +681,9 @@ static const TidyOptionDoc option_docs[] = "This option specifies the number Tidy uses to determine if further errors " "should be shown. If set to 0, then no errors are shown. " }, + {TidyShowInfo, + "This option specifies if Tidy should display info-level messages. " + }, {TidyShowWarnings, "This option specifies if Tidy should suppress warnings. This can be " "useful when a few errors are hidden in a flurry of warnings. " @@ -1083,6 +1086,7 @@ __attribute__((format(printf, 2, 3))) void message( TidyDocImpl* doc, TidyReportLevel level, ctmbstr msg, ... ) { + if (level == TidyInfo && !cfgBool(doc, TidyShowInfo)) return; va_list args; va_start( args, msg ); messagePos( doc, level, 0, 0, msg, args ); @@ -1812,6 +1816,7 @@ void TY_(NeedsAuthorIntervention)( TidyDocImpl* doc ) void TY_(GeneralInfo)( TidyDocImpl* doc ) { + if (!cfgBool(doc, TidyShowInfo)) return; tidy_out(doc, "About this fork of Tidy: http://w3c.github.com/tidy-html5/\n"); tidy_out(doc, "Bug reports and comments: https://github.com/w3c/tidy-html5/issues/\n"); tidy_out(doc, "Or send questions and comments to html-tidy@w3.org\n"); diff --git a/src/version.h b/src/version.h index 34507fe..534f480 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -static const char TY_(release_date)[] = "https://github.com/w3c/tidy-html5/tree/1f21625"; \ No newline at end of file +static const char TY_(release_date)[] = "https://github.com/w3c/tidy-html5/tree/880221e"; \ No newline at end of file