Style cleanup for previous commit.
This commit is contained in:
parent
1c963acb58
commit
9834cc17ad
|
@ -68,7 +68,7 @@ static struct _msgfmt
|
||||||
|
|
||||||
/* attribute name */
|
/* attribute name */
|
||||||
{ INSERTING_ATTRIBUTE, "%s inserting \"%s\" attribute" }, /* Warning in CheckLINK, Error otherwise */
|
{ INSERTING_ATTRIBUTE, "%s inserting \"%s\" attribute" }, /* Warning in CheckLINK, Error otherwise */
|
||||||
{ INSERTING_AUTO_ATTRIBUTE, "%s inserting \"%s\" attribute using value \"%s\"" }, /* Error */
|
{ INSERTING_AUTO_ATTRIBUTE, "%s inserting \"%s\" attribute using value \"%s\"" }, /* Warning */
|
||||||
{ MISSING_ATTR_VALUE, "%s attribute \"%s\" lacks value" }, /* Warning in CheckUrl, Error otherwise */
|
{ MISSING_ATTR_VALUE, "%s attribute \"%s\" lacks value" }, /* Warning in CheckUrl, Error otherwise */
|
||||||
{ UNKNOWN_ATTRIBUTE, "%s unknown attribute \"%s\"" }, /* Error */
|
{ UNKNOWN_ATTRIBUTE, "%s unknown attribute \"%s\"" }, /* Error */
|
||||||
{ PROPRIETARY_ATTRIBUTE, "%s proprietary attribute \"%s\"" }, /* Error */
|
{ PROPRIETARY_ATTRIBUTE, "%s proprietary attribute \"%s\"" }, /* Error */
|
||||||
|
|
|
@ -852,14 +852,15 @@ void CheckIMG( TidyDocImpl* doc, Node *node )
|
||||||
|
|
||||||
if ( !HasAlt )
|
if ( !HasAlt )
|
||||||
{
|
{
|
||||||
if ( cfg(doc, TidyAccessibilityCheckLevel) == 0 && !cfgStr(doc, TidyAltText) )
|
ctmbstr alttext = cfgStr(doc, TidyAltText);
|
||||||
|
if ( ( cfg(doc, TidyAccessibilityCheckLevel) == 0 ) && ( !alttext ) )
|
||||||
{
|
{
|
||||||
doc->badAccess |= BA_MISSING_IMAGE_ALT;
|
doc->badAccess |= BA_MISSING_IMAGE_ALT;
|
||||||
TY_(ReportMissingAttr)( doc, node, "alt" );
|
TY_(ReportMissingAttr)( doc, node, "alt" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cfgStr(doc, TidyAltText) ) {
|
if ( alttext ) {
|
||||||
AttVal *attval = TY_(AddAttribute)( doc, node, "alt", cfgStr(doc, TidyAltText) );
|
AttVal *attval = TY_(AddAttribute)( doc, node, "alt", alttext );
|
||||||
TY_(ReportAttrError)( doc, node, attval, INSERTING_AUTO_ATTRIBUTE);
|
TY_(ReportAttrError)( doc, node, attval, INSERTING_AUTO_ATTRIBUTE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue