From 70cc9e865014827b6616d9569835854e2a7a8ee9 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 4 Mar 2014 10:00:28 +0000 Subject: [PATCH] Allow bold, italics or underlined for numbers git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8851 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/WikicreoleTable.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/plugin/WikicreoleTable.php b/lib/plugin/WikicreoleTable.php index 5ea208a58..c73d6c316 100644 --- a/lib/plugin/WikicreoleTable.php +++ b/lib/plugin/WikicreoleTable.php @@ -118,8 +118,8 @@ class WikiPlugin_WikicreoleTable $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 @@ class WikiPlugin_WikicreoleTable 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] .*? \\]"; -- 2.42.0