You are here: Foswiki>Tasks Web>Item13207 (05 Jul 2015, GeorgeClark)Edit Attach

Item13207: wiki markup not rendered the line before a table

Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component: FoswikiRender, WysiwygPlugin
Branches: master
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
This bug affects both, the FoswikiRenderer as well as the WysiwygPlugin / TinyMCEPlugin. Both need separate patches. The bug is triggered when the lines of a chunk of TML is parsed and lists and tables are extracted and inserted back into the text as HTML. During that course adjacent TML might be affected in a way that the further rendering process does not behave as expected.

You type

| data | data |

| data | data |

| data | data |

| data | data |

You get


Should be


data data


data data


data data

Syntax Syntax

data data

This is caused by the table parser consuming the linefeed before so that when getRenderedVersion is called it is faced with this:

_Syntax_<table class='foswikiTable'><tbody><tr ><td>  data  </td>
<td>  data  </td>

... which then blocks the wiki markup from being expanded.


This fixes it (adding a space before emitting the <table class="foswikiTable>)

diff --git a/core/lib/Foswiki/ b/core/lib/Foswiki/
index 400ce89..2063edb 100644
--- a/core/lib/Foswiki/
+++ b/core/lib/Foswiki/
@@ -1138,7 +1138,7 @@ sub _addTHEADandTFOOT {
-    $lines->[ $i++ ] = "<table class='foswikiTable'>";
+    $lines->[ $i++ ] = " <table class='foswikiTable'>";
     if ($headLines) {
         splice( @$lines, $i++,            0, '<thead>' );

However I wonder why the table parser consumes the linefeed in the first place.

The list parser seems to behave the same way though does not show the same error. That is wiki markup the line before a list is rendered just fine. The TML renderer seems to emit enough whitespace infront and after a list so that adjacent TML isn't harmed.

WysiwygPlugin still seems to have problems displaying a proper preview of TML.

-- MichaelDaum - 12 Jan 2015


ItemTemplate edit

Summary wiki markup not rendered the line before a table
ReportedBy MichaelDaum
SVN Range
AppliesTo Engine
Component FoswikiRender, WysiwygPlugin
Priority Urgent
CurrentState Closed
Checkins distro:fe71c45005eb
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches master
masterCheckins distro:fe71c45005eb
Topic revision: r3 - 05 Jul 2015, GeorgeClark - This page was cached on 26 Oct 2016 - 11:13.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License