diff --git a/build/win64/build-me.bat b/build/win64/build-me.bat
index 2e9ba9f..4cb8374 100644
--- a/build/win64/build-me.bat
+++ b/build/win64/build-me.bat
@@ -1,4 +1,6 @@
@setlocal
+@REM 20170702 - Check branch
+@set TMPBR=next
@REM 20161002 - Change to msvc140 build
@set VCVERS=14
@set GENERATOR=Visual Studio %VCVERS% Win64
@@ -62,6 +64,9 @@
:GOTCMD
@call chkmsvc %TMPPRJ%
+@call chkbranch %TMPBR%
+@if ERRORLEVEL 1 goto BADBR
+:GOTBR
@echo Begin %DATE% %TIME%, output to %TMPLOG%
@echo Begin %DATE% %TIME% >> %TMPLOG%
@@ -176,6 +181,16 @@
@if ERRORLEVEL 1 goto ERR33
@goto DNREL
+:BADBR
+@call git checkout %TMPBR%
+@call chkbranch %TMPBR%
+@if ERRORLEVEL 1 goto BADBR2
+@goto GOTBR
+:BADBR2
+@call shwbranch
+@echo Not on correct branch %TMPBR%
+@goto ISERR
+
:ISERR
@endlocal
@exit /b 1
diff --git a/include/tidy.h b/include/tidy.h
index a29e263..bc83b79 100644
--- a/include/tidy.h
+++ b/include/tidy.h
@@ -548,6 +548,8 @@ TIDY_EXPORT int TIDY_CALL tidySetOutCharEncoding(TidyDoc tdoc, /**< The
/** This typedef represents the required signature for your provided callback
** function should you wish to register one with tidySetOptionCallback().
** Your callback function will be provided with the following parameters.
+ ** Note that this is deprecated and you should instead migrate to
+ ** tidySetConfigCallback().
** @param option The option name that was provided.
** @param value The option value that was provided
** @return Your callback function will return `yes` if it handles the provided
@@ -560,12 +562,38 @@ typedef Bool (TIDY_CALL *TidyOptCallback)(ctmbstr option, ctmbstr value);
** configuration file options. Setting this callback allows a LibTidy
** application developer to examine command-line and configuration file options
** after LibTidy has examined them and failed to recognize them.
+ ** Note that this is deprecated and you should instead migrate to
+ ** tidySetConfigCallback().
** @result Returns `yes` upon success.
*/
TIDY_EXPORT Bool TIDY_CALL tidySetOptionCallback(TidyDoc tdoc, /**< The document to apply the callback to. */
TidyOptCallback pOptCallback /**< The name of a function of type TidyOptCallback() to serve as your callback. */
);
+/** This typedef represents the required signature for your provided callback
+ ** function should you wish to register one with tidySetOptionCallback().
+ ** Your callback function will be provided with the following parameters.
+ ** @param tdoc The document instance for which the callback was invoked.
+ ** @param option The option name that was provided.
+ ** @param value The option value that was provided
+ ** @return Your callback function will return `yes` if it handles the provided
+ ** option, or `no` if it does not. In the latter case, Tidy will issue
+ ** an unknown configuration option error.
+ */
+typedef Bool (TIDY_CALL *TidyConfigCallback)(TidyDoc tdoc, ctmbstr option, ctmbstr value);
+
+/** Applications using TidyLib may want to augment command-line and
+ ** configuration file options. Setting this callback allows a LibTidy
+ ** application developer to examine command-line and configuration file options
+ ** after LibTidy has examined them and failed to recognize them.
+ ** Note that this is deprecated and you should instead migrate to
+ ** tidySetConfigCallback().
+ ** @result Returns `yes` upon success.
+ */
+TIDY_EXPORT Bool TIDY_CALL tidySetConfigCallback(TidyDoc tdoc, /**< The document to apply the callback to. */
+ TidyConfigCallback pConfigCallback /**< The name of a function of type TidyConfigCallback() to serve as your callback. */
+ );
+
/** @}
** @name Option ID Discovery
** @{
diff --git a/include/tidyenum.h b/include/tidyenum.h
index f7799d0..b6b12f7 100644
--- a/include/tidyenum.h
+++ b/include/tidyenum.h
@@ -268,12 +268,14 @@ extern "C" {
FN(REMOVED_HTML5) \
FN(XML_DECLARATION_DETECTED) \
/* Report, mixed use */ \
+ FN(ADDED_MISSING_CHARSET) \
FN(COERCE_TO_ENDTAG) \
FN(ELEMENT_NOT_EMPTY) \
+ FN(FOUND_STYLE_IN_BODY) \
+ FN(MOVED_STYLE_TO_HEAD) \
FN(UNEXPECTED_END_OF_FILE) \
- FN(UNEXPECTED_ENDTAG) \
- FN(ADDED_MISSING_CHARSET)
-
+ FN(UNEXPECTED_ENDTAG)
+
/** These are report messages added by Tidy's accessibility module. */
#define FOREACH_ACCESS_MSG(FN) \
@@ -594,6 +596,7 @@ typedef enum
TidyMergeDivs, /**< Merge multiple DIVs */
TidyMergeEmphasis, /**< Merge nested B and I elements */
TidyMergeSpans, /**< Merge multiple SPANs */
+ TidyMetaCharset, /**< Adds/checks/fixes meta charset in the head, based on document type */
#if SUPPORT_ASIAN_ENCODINGS
TidyNCR, /**< Allow numeric character references */
#else
@@ -625,10 +628,12 @@ typedef enum
TidyShowErrors, /**< Number of errors to put out */
TidyShowInfo, /**< If true, info-level messages are shown */
TidyShowMarkup, /**< If false, normal output is suppressed */
+ TidyShowMetaChange, /**< show when meta http-equiv content charset was changed - compatibility */
TidyShowWarnings, /**< However errors are always shown */
TidySkipNested, /**< Skip nested tags in script and style CDATA */
TidySortAttributes, /**< Sort attributes */
TidyStrictTagsAttr, /**< Ensure tags and attributes match output HTML version */
+ TidyStyleTags, /**< Move sytle to head */
TidyTabSize, /**< Expand tabs to n spaces */
TidyUpperCaseAttrs, /**< Output attributes in upper not lower case */
TidyUpperCaseTags, /**< Output tags in upper not lower case */
@@ -650,8 +655,6 @@ typedef enum
TidyXmlPIs, /**< If set to yes PIs must end with ?> */
TidyXmlSpace, /**< If set to yes adds xml:space attr as needed */
TidyXmlTags, /**< Treat input as XML */
- TidyMetaCharset, /**< Adds/checks/fixes meta charset in the head, based on document type */
- TidyShowMetaChange, /**< show when meta http-equiv content charset was changed - compatibility */
N_TIDY_OPTIONS /**< Must be last */
} TidyOptionId;
diff --git a/localize/translations/language_en_gb.po b/localize/translations/language_en_gb.po
index 097b349..c6b36e5 100644
--- a/localize/translations/language_en_gb.po
+++ b/localize/translations/language_en_gb.po
@@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
-"PO-Revision-Date: 2017-05-13 21:04:45\n"
+"PO-Revision-Date: 2017-08-28 10:04:30\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@@ -85,6 +85,12 @@ msgid ""
"&emdash;
, ”
, and other named "
"character entities are downgraded to their closest ASCII equivalents. "
msgstr ""
+"Can be used to modify behaviour of the clean
option when set "
+"to yes. "
+"
"
+"If set to yes when using clean
, "
+"&emdash;
, ”
, and other named "
+"character entities are downgraded to their closest ASCII equivalents. "
#. Important notes for translators:
#. - Use only
, , , , and
@@ -518,6 +524,8 @@ msgid ""
"This option specifies if Tidy should enable specific behavior for "
"cleaning up HTML exported from Google Docs. "
msgstr ""
+"This option specifies if Tidy should enable specific behaviour for "
+"cleaning up HTML exported from Google Docs. "
#. Important notes for translators:
#. - Use only
, , , , and
@@ -718,6 +726,16 @@ msgid ""
"and ensure that whitespace within attribute values is passed "
"through unchanged, set this option to yes. "
msgstr ""
+"This option specifies how Tidy deals with whitespace characters within "
+"attribute values. "
+"
"
+"If the value is no Tidy normalises attribute values by "
+"replacing any newline or tab with a single space, and further by replacing "
+"any contiguous whitespace with a single space. "
+"
"
+"To force Tidy to preserve the original, literal values of all attributes "
+"and ensure that whitespace within attribute values is passed "
+"through unchanged, set this option to yes. "
#. Important notes for translators:
#. - Use only
, , , , and
@@ -1302,8 +1320,12 @@ msgid ""
"This option specifies if Tidy should output attribute names in upper "
"case. "
"
"
-"The default is no, which results in lower case attribute "
-"names, except for XML input, where the original case is preserved. "
+"When set to no, attribute names will be written in lower "
+"case. Specifying yes will output attribute names in upper "
+"case, and preserve can used to leave attribute names "
+"untouched. "
+"
"
+"When using XML input, the original case is always preserved. "
msgstr ""
#. Important notes for translators:
@@ -1348,6 +1370,21 @@ msgid ""
"document using opening tags; matching closing tags will be recognized "
"accordingly, and unknown closing tags will be discarded. "
msgstr ""
+"This option enables the use of tags for autonomous custom elements, "
+"e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+"value is no. Other settings - blocklevel, "
+"empty, inline, and pre will treat "
+"all detected custom tags accordingly. "
+"
"
+"The use of new-blocklevel-tags
, "
+"new-empty-tags
, new-inline-tags
, or "
+"new-pre-tags
will override the treatment of custom tags "
+"by this configuration option. This may be useful if you have "
+"different types of custom tags."
+"
"
+"When enabled these tags are determined during the processing of your "
+"document using opening tags; matching closing tags will be recognised "
+"accordingly, and unknown closing tags will be discarded. "
#. Important notes for translators:
#. - Use only
, , , , and
@@ -1646,6 +1683,20 @@ msgid ""
"error correcting HTML parser. "
msgstr ""
+#. Important notes for translators:
+#. - Use only
, , , , and
+#.
.
+#. - Entities, tags, attributes, etc., should be enclosed in
.
+#. - Option values should be enclosed in .
+#. - It's very important that
be self-closing!
+#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
+#. be translated.
+msgctxt "TidyStyleTags"
+msgid ""
+"This option specifies if Tidy should move all style tags to the "
+"head of the document. "
+msgstr ""
+
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr ""
@@ -2444,12 +2495,12 @@ msgstr ""
#, c-format
msgctxt "UNKNOWN_ELEMENT_LOOKS_CUSTOM"
msgid "%s is not recognized! Did you mean to enable the custom-tags option?"
-msgstr ""
+msgstr "%s is not recognised! Did you mean to enable the custom-tags option?"
#, c-format
msgctxt "UNKNOWN_ELEMENT"
msgid "%s is not recognized!"
-msgstr ""
+msgstr "%s is not recognised!"
#, c-format
msgctxt "MISSING_ATTRIBUTE"
@@ -2536,6 +2587,14 @@ msgctxt "UNEXPECTED_ENDTAG"
msgid "unexpected %s>"
msgstr ""
+msgctxt "MOVED_STYLE_TO_HEAD"
+msgid "moved