From: <var...@us...> - 2014-03-04 10:00:32
|
Revision: 8851 http://sourceforge.net/p/phpwiki/code/8851 Author: vargenau Date: 2014-03-04 10:00:28 +0000 (Tue, 04 Mar 2014) Log Message: ----------- Allow bold, italics or underlined for numbers Modified Paths: -------------- trunk/lib/plugin/WikicreoleTable.php Modified: trunk/lib/plugin/WikicreoleTable.php =================================================================== --- trunk/lib/plugin/WikicreoleTable.php 2014-01-28 17:10:36 UTC (rev 8850) +++ trunk/lib/plugin/WikicreoleTable.php 2014-03-04 10:00:28 UTC (rev 8851) @@ -118,8 +118,8 @@ $cell = trim(substr($cell, 1)); $html_row->pushContent(HTML::th(TransformInline($cell, $basepage))); } else { - if (is_numeric($cell)) { - $html_row->pushContent(HTML::td(array('style' => "text-align:right"), $cell)); + if ($this->is_wiki_numeric($cell)) { + $html_row->pushContent(HTML::td(array('style' => "text-align:right"), TransformInline($cell, $basepage))); } else { $html_row->pushContent(HTML::td(TransformInline($cell, $basepage))); } @@ -130,6 +130,12 @@ return $html_table; } + // $cell is a number, possibly in bold, italics or underlined + private function is_wiki_numeric($cell) + { + return is_numeric(trim($cell, "*/_'")); + } + private function parse_row($line) { $bracket_link = "\\[ .*? [^]\s] .*? \\]"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |