diff --git a/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php b/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php index 9fd17a5cd4..8f2ac2c2ab 100644 --- a/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php +++ b/src/applications/macro/remarkup/PhabricatorRemarkupRuleImageMacro.php @@ -12,7 +12,7 @@ final class PhabricatorRemarkupRuleImageMacro public function apply($text) { return preg_replace_callback( - '@^([a-zA-Z0-9:_\-]+)$@m', + '@^\s*([a-zA-Z0-9:_\-]+)$@m', array($this, 'markupImageMacro'), $text); } diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentQuoteController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentQuoteController.php index 2e20b1ac3b..01a40c14a0 100644 --- a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentQuoteController.php +++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentQuoteController.php @@ -34,6 +34,7 @@ final class PhabricatorApplicationTransactionCommentQuoteController } $content = $xaction->getComment()->getContent(); + $content = rtrim($content, "\r\n"); $content = phutil_split_lines($content, true); foreach ($content as $key => $line) { if (strlen($line) && ($line[0] != '>')) {