Diff
Not logged in

Differences From:

File src/wikiformat.c part of check-in [7351b6346d] - Add the "/doc" method on the server. by drh on 2008-05-15 16:58:42. [view]

To:

File src/wikiformat.c part of check-in [1bbc5b7e6c] - Fix bugs in the rendering of HTML markup with multiple attributes. This clears up a problem in displaying the "concepts.wiki" documentation file. by drh on 2008-05-16 00:56:01. [view]

@@ -601,8 +601,9 @@
 ** 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]=='/' ){
@@ -631,9 +632,9 @@
       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;
@@ -654,13 +655,14 @@
       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++; }
   }
 }
 
 /*