mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +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:
parent
0f1acb6cef
commit
84fd5cd5bb
3 changed files with 14 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -66,6 +66,8 @@ abstract class PhutilRemarkupQuotedBlockRule
|
|||
foreach ($text as $key => $line) {
|
||||
if (!strlen(trim($line))) {
|
||||
unset($text[$key]);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
> x
|
||||
>
|
||||
> y
|
||||
~~~~~~~~~~
|
||||
<blockquote><p>x</p>
|
||||
|
||||
<p>y</p></blockquote>
|
||||
~~~~~~~~~~
|
||||
> x
|
||||
>
|
||||
> y
|
Loading…
Reference in a new issue