Fossil

View Ticket
Login
Ticket Hash: 0fd3c7d243e74adf4d51d6f36d7d5d294245bac4
Title: wiki inserts P tags in tables
Status: Closed Type: Code_Defect
Severity: Minor Priority: Immediate
Subsystem: Resolution: Drive_By_Patch
Last Modified: 2024-02-03 23:05:13
Version Found In: 12a79e5b93
Description:
Fossils wiki inserts extra p tags around the first row in the first column of every table, for example:
<table>
 <tr>
  <td>first item</td>
  <td>second item</td>
 </tr>
</table>

renders as

<table>
 <tr>
  <td><p>first item</p></td>
  <td>second item</td>
 </tr>
</table>

anonymous added on 2010-12-27 13:01:03:
The following small patch seems to fix the problem:

Index: src/wikiformat.c
===================================================================
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1404,10 +1404,11 @@
           if( backupToType(p, MUTYPE_TABLE|MUTYPE_TR) ){
             if( stackTopType(p)==MUTYPE_TABLE ){
               pushStack(p, MARKUP_TR);
               blob_append(p->pOut, "", 4);
             }
+            p->wantAutoParagraph = 0;
             pushStack(p, markup.iCode);
             renderMarkup(p->pOut, &markup);
           }
         }else
         if( markup.iType==MUTYPE_HYPERLINK ){

anonymous added on 2010-12-27 13:13:51:
You can use:

<nowiki>
</nowiki>
User Comments:
wyoung added on 2024-02-03 23:05:13:

Applied here. Thank you!