Description

If a table has more than one wiki-like markup option, like tableclass and tablestyle together within <...>, then it messes up the parsing of the table.

The wiki-like markup includes the words style rowstyle tablestyle class rowclass tableclass id. If any two of these words appear in one <...>, none of the style applies. Examples are given below. Note that this did not happen under 1.3.5; I've used 1.5RC4, 1.5.0 and 1.5.1 and all of them give the same buggy behaviour.

Steps to reproduce

  1. Create a table with <tablestyle="float:right;" tableclass="myclass"> and the only styling it gets is class="float:right;".

Example

The first 2 tables below are styled correctly, the last one should have an aqua background and class "foobar" but doesn't.

Table with class

Wiki markup {{{||<tableclass="foobar"> Table with class || Two || ||class="foobar"||Four||}}} produces HTML (I've fiddled with the whitespace) {{{<table class="foobar"> <tr><td><p> Table with class </p></td>

<span id="line-16" class="anchor"></span> <tr><td><p>class="foobar"</p></td> <td><p>Four</p></td></tr> <span id="line-17" class="anchor"></span></table>}}}

On this wiki, the output is

Table with class

Two

class="foobar"

Four

At the time of writing this, the output was class.png

Table with style

Wiki markup {{{||<tablestyle="background-color: aqua;">Table with style||Two|| ||style="background-color: aqua;"||Four||}}} produces HTML {{{<table style="background-color: aqua;"> <tr><td><p>Table with style</p></td> <td><p>Two</p></td></tr> <span id="line-19" class="anchor"></span><tr> <td><p>style="background-color: aqua;"</p></td> <td><p>Four</p></td></tr> <span id="line-20" class="anchor"></span></table>}}}

On this wiki, the output is

Table with style

Two

style="background-color: aqua;"

Four

At the time of writing this, the output was style.png

Table with class and style

{{{||<tableclass="foobar" tablestyle="background-color: aqua;"> Style and class || Two || ||as above||Four||}}} produces HTML {{{<table class="background-color: aqua;"> <tr><td><p> Style and class </p></td> <td><p> Two </p></td></tr> <span id="line-22" class="anchor"></span><tr> <td><p>as above</p></td> <td><p>Four</p></td></tr> <span id="line-23" class="anchor"></span></table>}}}

On this wiki, the output is

Style and class

Two

as above

Four

At the time of writing this, the output was styleandclass.png

Details

This Wiki.

Workaround

Only solution is to rewrite all your tables. :-(

||as above||Four||}}}

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/TableStyleClassIgnored (last edited 2007-10-29 19:08:49 by localhost)