1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

Fix an issue where intracontent empty lines were incorrectly trimmed in quoted blocks

Summary: Fixes T13335. When processing quoted blocks, we remove leading empty lines. This logic incorrectly continued after encountering a nonempty line.

Test Plan: Added a test, made it pass. Previewed blocks in web UI.

Maniphest Tasks: T13335

Differential Revision: https://secure.phabricator.com/D20965
This commit is contained in:
epriestley 2020-02-04 08:03:28 -08:00
parent 0f1acb6cef
commit 84fd5cd5bb
3 changed files with 14 additions and 1 deletions

View file

@ -42,7 +42,7 @@ final class PhabricatorMarkupEngine extends Phobject {
private $objects = array();
private $viewer;
private $contextObject;
private $version = 19;
private $version = 20;
private $engineCaches = array();
private $auxiliaryConfig = array();

View file

@ -66,6 +66,8 @@ abstract class PhutilRemarkupQuotedBlockRule
foreach ($text as $key => $line) {
if (!strlen(trim($line))) {
unset($text[$key]);
} else {
break;
}
}

View file

@ -0,0 +1,11 @@
> x
>
> y
~~~~~~~~~~
<blockquote><p>x</p>
<p>y</p></blockquote>
~~~~~~~~~~
> x
>
> y