Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | foreach ($rows as $row) { | ||||
if (!strlen(trim($content))) { | if (!strlen(trim($content))) { | ||||
continue; | continue; | ||||
} | } | ||||
return $table->newRawString(); | return $table->newRawString(); | ||||
} | } | ||||
// Respect newlines in table cells as literal linebreaks. | |||||
$content = $cell->newRawContentString(); | $content = $cell->newRawContentString(); | ||||
$content = $this->applyRules($content); | $content = trim($content, "\r\n"); | ||||
$lines = phutil_split_lines($content, $retain_endings = false); | |||||
foreach ($lines as $key => $line) { | |||||
$lines[$key] = $this->applyRules($line); | |||||
} | |||||
$content = phutil_implode_html( | |||||
phutil_tag('br'), | |||||
$lines); | |||||
$cell_specs[] = array( | $cell_specs[] = array( | ||||
'type' => $cell->getTagName(), | 'type' => $cell->getTagName(), | ||||
'content' => $content, | 'content' => $content, | ||||
); | ); | ||||
} | } | ||||
$row_specs[] = array( | $row_specs[] = array( | ||||
Show All 9 Lines |