Page MenuHomePhabricator

D20971.diff
No OneTemporary

D20971.diff

diff --git a/src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php b/src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php
--- a/src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php
+++ b/src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php
@@ -121,8 +121,19 @@
return $table->newRawString();
}
+ // Respect newlines in table cells as literal linebreaks.
+
$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(
'type' => $cell->getTagName(),

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 11:19 PM (6 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7389094
Default Alt Text
D20971.diff (943 B)

Event Timeline