Menu

Commit [r9069]  Maximize  Restore  History

WikiFormatting: improve row separators for complex tables

- add support for WikiMedia style row separators (`|-`)
- add a `#!tr` WikiProcessor

Either way can be used to separate `#!td` cells in multiple rows in a more explicit way than by using an isolated `||`.

For the `|-` separator, there can be more than one '-', so that rows can be better visualised:

Example:
{{{
{{{
#!th
Heading A
}}}
{{{
#!th
Heading B
}}}
|---------
{{{
#!td
Content A
}}}
{{{
#!td
Content B
}}}
}}}

The `#!tr` processor can be used when nesting is preferred, or when one wants to specify attributes to the row element (typically style="background: ...").

Note that since anything not looking like a 'key=value' pair is also allowed but ignored after a processor name, one can also take benefit of this to visually enhance the structure of the markup:
{{{

{{{!tr ==============================================
{{{#!th

Header A

}}}
{{{#!th -----------------------------------------

Header B

}}}
}}}
{{{!tr ==============================================
{{{#!td

Content A

}}}
{{{#!td -----------------------------------------

Content B

}}}
}}}
}}}

cboos 2010-01-24

changed /trunk/trac/wiki/formatter.py
changed /trunk/trac/wiki/parser.py
changed /trunk/trac/wiki/tests/wiki-tests.txt
/trunk/trac/wiki/formatter.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/parser.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/tests/wiki-tests.txt Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB