Commit 84fd5cd5 authored by epriestley's avatar epriestley
Browse files

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
parent 0f1acb6c
......@@ -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;
}
}
......
> x
>
> y
~~~~~~~~~~
<blockquote><p>x</p>
<p>y</p></blockquote>
~~~~~~~~~~
> x
>
> y
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment