Merge branch 'issue_521' into next
This commit is contained in:
commit
47a32891c8
|
@ -222,6 +222,7 @@ extern "C" {
|
||||||
FN(MISSING_DOCTYPE) \
|
FN(MISSING_DOCTYPE) \
|
||||||
FN(MISSING_ENDTAG_BEFORE) \
|
FN(MISSING_ENDTAG_BEFORE) \
|
||||||
FN(MISSING_ENDTAG_FOR) \
|
FN(MISSING_ENDTAG_FOR) \
|
||||||
|
FN(MISSING_ENDTAG_OPTIONAL) \
|
||||||
FN(MISSING_IMAGEMAP) \
|
FN(MISSING_IMAGEMAP) \
|
||||||
FN(MISSING_QUOTEMARK) \
|
FN(MISSING_QUOTEMARK) \
|
||||||
FN(MISSING_QUOTEMARK_OPEN) \
|
FN(MISSING_QUOTEMARK_OPEN) \
|
||||||
|
|
|
@ -5,7 +5,7 @@ msgstr ""
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
"X-Generator: HTML Tidy poconvert.rb\n"
|
"X-Generator: HTML Tidy poconvert.rb\n"
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2017-10-02 13:19:15\n"
|
"POT-Creation-Date: 2017-10-02 13:26:57\n"
|
||||||
"Last-Translator: jderry\n"
|
"Last-Translator: jderry\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
|
||||||
|
@ -2367,6 +2367,11 @@ msgctxt "MISSING_ENDTAG_FOR"
|
||||||
msgid "missing </%s>"
|
msgid "missing </%s>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgctxt "MISSING_ENDTAG_OPTIONAL"
|
||||||
|
msgid "missing optional end tag </%s>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgctxt "MISSING_IMAGEMAP"
|
msgctxt "MISSING_IMAGEMAP"
|
||||||
msgid "%s should use client-side image map"
|
msgid "%s should use client-side image map"
|
||||||
|
|
|
@ -1910,6 +1910,7 @@ static languageDefinition language_en = { whichPluralForm_en, {
|
||||||
{ MISSING_DOCTYPE, 0, "missing <!DOCTYPE> declaration" },
|
{ MISSING_DOCTYPE, 0, "missing <!DOCTYPE> declaration" },
|
||||||
{ MISSING_ENDTAG_BEFORE, 0, "missing </%s> before %s" },
|
{ MISSING_ENDTAG_BEFORE, 0, "missing </%s> before %s" },
|
||||||
{ MISSING_ENDTAG_FOR, 0, "missing </%s>" },
|
{ MISSING_ENDTAG_FOR, 0, "missing </%s>" },
|
||||||
|
{ MISSING_ENDTAG_OPTIONAL, 0, "missing optional end tag </%s>" },
|
||||||
{ MISSING_IMAGEMAP, 0, "%s should use client-side image map" },
|
{ MISSING_IMAGEMAP, 0, "%s should use client-side image map" },
|
||||||
{ MISSING_QUOTEMARK, 0, "%s attribute with missing trailing quote mark" },
|
{ MISSING_QUOTEMARK, 0, "%s attribute with missing trailing quote mark" },
|
||||||
{ MISSING_QUOTEMARK_OPEN, 0, "value for attribute \"%s\" missing quote marks" },
|
{ MISSING_QUOTEMARK_OPEN, 0, "value for attribute \"%s\" missing quote marks" },
|
||||||
|
|
|
@ -310,6 +310,7 @@ static struct _dispatchTable {
|
||||||
{ MISSING_DOCTYPE, TidyWarning, formatStandard },
|
{ MISSING_DOCTYPE, TidyWarning, formatStandard },
|
||||||
{ MISSING_ENDTAG_BEFORE, TidyWarning, formatStandard },
|
{ MISSING_ENDTAG_BEFORE, TidyWarning, formatStandard },
|
||||||
{ MISSING_ENDTAG_FOR, TidyWarning, formatStandard },
|
{ MISSING_ENDTAG_FOR, TidyWarning, formatStandard },
|
||||||
|
{ MISSING_ENDTAG_OPTIONAL, TidyInfo, formatStandard },
|
||||||
{ MISSING_IMAGEMAP, TidyWarning, formatAttributeReport },
|
{ MISSING_IMAGEMAP, TidyWarning, formatAttributeReport },
|
||||||
{ MISSING_QUOTEMARK, TidyWarning, formatAttributeReport },
|
{ MISSING_QUOTEMARK, TidyWarning, formatAttributeReport },
|
||||||
{ MISSING_QUOTEMARK_OPEN, TidyInfo, formatAttributeReport },
|
{ MISSING_QUOTEMARK_OPEN, TidyInfo, formatAttributeReport },
|
||||||
|
@ -814,6 +815,7 @@ TidyMessageImpl *formatStandard(TidyDocImpl* doc, Node *element, Node *node, uin
|
||||||
return TY_(tidyMessageCreateWithNode)(doc, rpt, code, level, nodedesc );
|
return TY_(tidyMessageCreateWithNode)(doc, rpt, code, level, nodedesc );
|
||||||
|
|
||||||
case MISSING_ENDTAG_FOR:
|
case MISSING_ENDTAG_FOR:
|
||||||
|
case MISSING_ENDTAG_OPTIONAL:
|
||||||
case PREVIOUS_LOCATION:
|
case PREVIOUS_LOCATION:
|
||||||
return TY_(tidyMessageCreateWithNode)(doc, rpt, code, level, element->element );
|
return TY_(tidyMessageCreateWithNode)(doc, rpt, code, level, element->element );
|
||||||
|
|
||||||
|
|
|
@ -1271,6 +1271,11 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode)
|
||||||
if ( !TY_(nodeHasCM)(element, CM_OPT) && !element->implicit )
|
if ( !TY_(nodeHasCM)(element, CM_OPT) && !element->implicit )
|
||||||
TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE );
|
TY_(Report)(doc, element, node, MISSING_ENDTAG_BEFORE );
|
||||||
|
|
||||||
|
/* #521, warn on missing optional end-tags if not omitting them. */
|
||||||
|
if ( cfgBool( doc, TidyOmitOptionalTags ) == no && TY_(nodeHasCM)(element, CM_OPT) )
|
||||||
|
TY_(Report)(doc, element, node, MISSING_ENDTAG_OPTIONAL );
|
||||||
|
|
||||||
|
|
||||||
TY_(UngetToken)( doc );
|
TY_(UngetToken)( doc );
|
||||||
|
|
||||||
if ( TY_(nodeHasCM)(node, CM_LIST) )
|
if ( TY_(nodeHasCM)(node, CM_LIST) )
|
||||||
|
|
Loading…
Reference in a new issue