Permalink
Browse files

Merge pull request #48 from mikoim/feature/ytable

スペースを含むセルが空になる問題を修正
  • Loading branch information...
2 parents eaaff51 + d0a7e46 commit 2a5080b4c364274f299f1bfcc573b4f586c53edd @logue committed May 10, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 wiki-common/lib/PukiWiki/Renderer/Element/YTable.php
@@ -66,7 +66,7 @@ public function __construct($row = array('cell1 ', ' cell2 ', ' cell3'))
$colspan = 1;
while (isset($_value[$i + $colspan]) && $_value[$i + $colspan] === FALSE) ++$colspan;
$colspan = ($colspan > 1) ? ' colspan="' . $colspan . '"' : '';
- $text = preg_match("/\s+/", $_value[$i]) ? '' : InlineFactory::factory($_value[$i]);
+ $text = preg_match("/\S+/", $_value[$i]) ? InlineFactory::factory($_value[$i]) : '';
$class = ((empty($text) || !preg_match("/\S+/", $text))) ? 'blank-cell' : '';
$align = $_align[$i] ? ' style="text-align:' . $_align[$i] . '"' : '';
$str[] = '<td class="'.$class.'"' . $align . $colspan . '>' . $text . '</td>';

0 comments on commit 2a5080b

Please sign in to comment.