Overview
SHA1 Hash: | 1bbc5b7e6cb0e64e632927b2c9803884f3445a58 |
---|---|
Date: | 2008-05-16 00:56:01 |
User: | drh |
Comment: | Fix bugs in the rendering of HTML markup with multiple attributes. This clears up a problem in displaying the "concepts.wiki" documentation file. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/wikiformat.c from [2f33e8ac29] to [43e274f49a].
@@ -600,10 +600,11 @@ ** The content of z[] might be modified by converting characters ** to lowercase and by inserting some "\000" characters. */ static void parseMarkup(ParsedMarkup *p, char *z){ int i, c; + int iCode; char *zTag, *zValue; int seen = 0; if( z[1]=='/' ){ p->endTag = 1; @@ -630,11 +631,11 @@ z[i] = tolower(z[i]); i++; } c = z[i]; z[i] = 0; - p->aAttr[p->nAttr].iCode = findAttr(zTag); + p->aAttr[p->nAttr].iCode = iCode = findAttr(zTag); z[i] = c; while( isspace(z[i]) ){ z++; } if( z[i]!='=' ){ p->aAttr[p->nAttr].zValue = 0; p->aAttr[p->nAttr].cTerm = 0; @@ -653,15 +654,16 @@ p->aAttr[p->nAttr].zValue = zValue; p->aAttr[p->nAttr].cTerm = c = z[i]; z[i] = 0; i++; } - if( p->aAttr[p->nAttr].iCode!=0 && (seen & p->aAttr[p->nAttr].iCode)==0 ){ - seen |= p->aAttr[p->nAttr].iCode; + if( iCode!=0 && (seen & aAttribute[iCode].iMask)==0 ){ + seen |= aAttribute[iCode].iMask; p->nAttr++; } if( c=='>' ) break; + while( isspace(z[i]) ){ i++; } } } /* ** Render markup on the given blob.