Migrated reports using formatter formatCustomTagDetected.

This commit is contained in:
Jim Derry 2017-09-02 18:04:51 -04:00
parent 0c8f684a4b
commit 66e4d1f8e6
2 changed files with 19 additions and 39 deletions

View File

@ -467,21 +467,25 @@ TidyMessageImpl *formatCustomTagDetected(TidyDocImpl* doc, Node *element, Node *
TagToString(element, elemdesc, sizeof(elemdesc));
switch ( cfg( doc, TidyUseCustomTags ) )
switch ( code )
{
case TidyCustomBlocklevel:
tagtype = tidyLocalizedString( TIDYCUSTOMBLOCKLEVEL_STRING );
break;
case TidyCustomEmpty:
tagtype = tidyLocalizedString( TIDYCUSTOMEMPTY_STRING );
break;
case TidyCustomInline:
tagtype = tidyLocalizedString( TIDYCUSTOMINLINE_STRING );
break;
case TidyCustomPre:
default:
tagtype = tidyLocalizedString( TIDYCUSTOMPRE_STRING );
break;
case CUSTOM_TAG_DETECTED:
switch ( cfg( doc, TidyUseCustomTags ) )
{
case TidyCustomBlocklevel:
tagtype = tidyLocalizedString( TIDYCUSTOMBLOCKLEVEL_STRING );
break;
case TidyCustomEmpty:
tagtype = tidyLocalizedString( TIDYCUSTOMEMPTY_STRING );
break;
case TidyCustomInline:
tagtype = tidyLocalizedString( TIDYCUSTOMINLINE_STRING );
break;
case TidyCustomPre:
default:
tagtype = tidyLocalizedString( TIDYCUSTOMPRE_STRING );
break;
}
}
return TY_(tidyMessageCreateWithNode)(doc, element, code, TidyInfo, elemdesc, tagtype );
@ -818,30 +822,6 @@ void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code)
message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, nodedesc, HTMLVersion( doc ) );
break;
case CUSTOM_TAG_DETECTED:
TagToString(element, elemdesc, sizeof(elemdesc));
switch ( cfg( doc, TidyUseCustomTags ) )
{
case TidyCustomBlocklevel:
tagtype = tidyLocalizedString( TIDYCUSTOMBLOCKLEVEL_STRING );
break;
case TidyCustomEmpty:
tagtype = tidyLocalizedString( TIDYCUSTOMEMPTY_STRING );
break;
case TidyCustomInline:
tagtype = tidyLocalizedString( TIDYCUSTOMINLINE_STRING );
break;
case TidyCustomPre:
default:
tagtype = tidyLocalizedString( TIDYCUSTOMPRE_STRING );
break;
}
message = TY_(tidyMessageCreateWithNode)(doc, element, code, TidyInfo, elemdesc, tagtype );
break;
case ELEMENT_VERS_MISMATCH_ERROR:
message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyError, nodedesc, HTMLVersion( doc ) );
break;

View File

@ -581,7 +581,7 @@ Bool TY_(FindTag)( TidyDocImpl* doc, Node *node )
/* Output a message the first time we encounter an autonomous custom
tag. This applies despite the HTML5 mode. */
TY_(ReportNotice)(doc, node, node, CUSTOM_TAG_DETECTED);
TY_(Report)(doc, node, node, CUSTOM_TAG_DETECTED);
return yes;
}