Suggestion: convert some attribute values to lowercase

Just a cosmetic change. Since Tidy by default converts tags and attributes
to lowercase, why not to convert to lowercase some attribute values which
are known to be case-insensitive, for example for align= and valign=
attributes?

Of course, it must be optional. The conversion may be added to attrs.c
module,
for example:

void wstrtolower(char *s)
{
    for (; *s; s++)
      *s = (char)ToLower((uint)*s);
}

void CheckAlign(Lexer *lexer, Node *node, AttVal *attval)
{

/* ... some code skipped ... */

    else if (! (wstrcasecmp(value, "left") == 0 ||
                wstrcasecmp(value, "center") == 0 ||
                wstrcasecmp(value, "right") == 0 ||
                wstrcasecmp(value, "justify") == 0))
          ReportAttrError(lexer, node, attval->value, BAD_ATTRIBUTE_VALUE);
    else if (LowerCaseValues)
          wstrtolower(value);

Received on Friday, 24 March 2000 13:12:55 UTC