Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15394061
D20971.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
943 B
Referenced Files
None
Subscribers
None
D20971.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D20971: Respect linebreaks in full HTML tables in Remarkup
Attached
Detach File
Event Timeline
Log In to Comment