I needed the ability to have multi-line tables. Other wiki's use \\ to designate a table break. I patched render_wiki.php as follows to provide the same functionality.
Comments to mike.at.mikeandkellycrowe.dot.com
diff -r c3211ac211ed render/render_wiki.inc.php
--- a/render/render_wiki.inc.php Wed Sep 12 15:49:26 2007 -0400
+++ b/render/render_wiki.inc.php Fri Oct 05 14:09:10 2007 -0400
@@ -565,6 +565,29 @@ class FormatBlockMonospaced extends Form
+
+class FormatBlockBrs extends FormatBlock
+{
+ public function renderAsHtml()
+ {
+ return $this->str;
+ }
+
+ static function parseBlocks(&$blocks)
+ {
+ $blocks_new= array();
+
+ foreach($blocks as $b) {
+
+ if($b->str && !($b instanceof FormatBlockCode)) {
+ $b->str = str_replace("\\\\","<br>",$b->str);
+ }
+ $blocks_new[]=$b;
+ }
+ return $blocks_new;
+
+ }
+}
class FormatBlockSub extends FormatBlock
{
@@ -1708,7 +1731,8 @@ class FormatBlockTable extends FormatBlo
$cell_blocks= FormatBlockLink::parseBlocks($cell_blocks);
$cell_blocks= FormatBlockHref::parseBlocks($cell_blocks);
- $new_cells[]= FormatBlockItemId::parseBlocks($cell_blocks);
+ $cell_blocks= FormatBlockBrs::parseBlocks($cell_blocks);
+ $new_cells[]= FormatBlockItemId::parseBlocks($cell_blocks);
}
$this->line_cells[]= $new_cells;