mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Make two small fixes to the quoting feature
Summary: Ref T4119. - Trim newlines off the quoted text before quoting it; otherwise we can end up with a staircase of ">" at the end of a quote. - Allow image macros to have leading whitespace, so multiple consecuitive quoted macros work properly. Test Plan: I QUOTED MACROS A LOT OF TIMES Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T4119 Differential Revision: https://secure.phabricator.com/D8983
This commit is contained in:
parent
2b4c551b0e
commit
85bc05be25
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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] != '>')) {
|
||||
|
|
Loading…
Reference in a new issue