Skip to content

Commit 9834cc1

Browse files
committed
Style cleanup for previous commit.
1 parent 1c963ac commit 9834cc1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/localize.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static struct _msgfmt
6868

6969
/* attribute name */
7070
{ INSERTING_ATTRIBUTE, "%s inserting \"%s\" attribute" }, /* Warning in CheckLINK, Error otherwise */
71-
{ INSERTING_AUTO_ATTRIBUTE, "%s inserting \"%s\" attribute using value \"%s\"" }, /* Error */
71+
{ INSERTING_AUTO_ATTRIBUTE, "%s inserting \"%s\" attribute using value \"%s\"" }, /* Warning */
7272
{ MISSING_ATTR_VALUE, "%s attribute \"%s\" lacks value" }, /* Warning in CheckUrl, Error otherwise */
7373
{ UNKNOWN_ATTRIBUTE, "%s unknown attribute \"%s\"" }, /* Error */
7474
{ PROPRIETARY_ATTRIBUTE, "%s proprietary attribute \"%s\"" }, /* Error */

src/tags.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -852,14 +852,15 @@ void CheckIMG( TidyDocImpl* doc, Node *node )
852852

853853
if ( !HasAlt )
854854
{
855-
if ( cfg(doc, TidyAccessibilityCheckLevel) == 0 && !cfgStr(doc, TidyAltText) )
855+
ctmbstr alttext = cfgStr(doc, TidyAltText);
856+
if ( ( cfg(doc, TidyAccessibilityCheckLevel) == 0 ) && ( !alttext ) )
856857
{
857858
doc->badAccess |= BA_MISSING_IMAGE_ALT;
858859
TY_(ReportMissingAttr)( doc, node, "alt" );
859860
}
860861

861-
if ( cfgStr(doc, TidyAltText) ) {
862-
AttVal *attval = TY_(AddAttribute)( doc, node, "alt", cfgStr(doc, TidyAltText) );
862+
if ( alttext ) {
863+
AttVal *attval = TY_(AddAttribute)( doc, node, "alt", alttext );
863864
TY_(ReportAttrError)( doc, node, attval, INSERTING_AUTO_ATTRIBUTE);
864865
}
865866
}

0 commit comments

Comments
 (0)