Page MenuHomePhabricator

D14247.id34398.diff
No OneTemporary

D14247.id34398.diff

diff --git a/src/markup/engine/__tests__/remarkup/quoted-angry.txt b/src/markup/engine/__tests__/remarkup/quoted-angry.txt
new file mode 100644
--- /dev/null
+++ b/src/markup/engine/__tests__/remarkup/quoted-angry.txt
@@ -0,0 +1,5 @@
+>>> REQUESTING CHANGES BECAUSE I'M ANGRY!
+~~~~~~~~~~
+<blockquote><blockquote><blockquote><p>REQUESTING CHANGES BECAUSE I&#039;M ANGRY!</p></blockquote></blockquote></blockquote>
+~~~~~~~~~~
+>>> REQUESTING CHANGES BECAUSE I'M ANGRY!
diff --git a/src/markup/engine/__tests__/remarkup/quoted-code-block.txt b/src/markup/engine/__tests__/remarkup/quoted-code-block.txt
--- a/src/markup/engine/__tests__/remarkup/quoted-code-block.txt
+++ b/src/markup/engine/__tests__/remarkup/quoted-code-block.txt
@@ -11,12 +11,6 @@
<span class="nv">$foo</span> <span class="k">=</span> <span class="s">&#039;bar&#039;</span><span class="k">;</span></pre></div></blockquote>
~~~~~~~~~~
> This should be a code block:
-
>
-
> <?php
-
> $foo = 'bar';
-
->
-
diff --git a/src/markup/engine/__tests__/remarkup/quotes.txt b/src/markup/engine/__tests__/remarkup/quotes.txt
--- a/src/markup/engine/__tests__/remarkup/quotes.txt
+++ b/src/markup/engine/__tests__/remarkup/quotes.txt
@@ -7,4 +7,3 @@
of your inflight food service.</p></blockquote>
~~~~~~~~~~
> Dear Sir, I am utterly disgusted with the quality of your inflight food service.
-
diff --git a/src/markup/engine/remarkup/blockrule/PhutilRemarkupQuotesBlockRule.php b/src/markup/engine/remarkup/blockrule/PhutilRemarkupQuotesBlockRule.php
--- a/src/markup/engine/remarkup/blockrule/PhutilRemarkupQuotesBlockRule.php
+++ b/src/markup/engine/remarkup/blockrule/PhutilRemarkupQuotesBlockRule.php
@@ -29,8 +29,17 @@
public function markupText($text, $children) {
if ($this->getEngine()->isTextMode()) {
- $lines = phutil_split_lines($children);
- return '> '.implode("\n> ", $lines);
+ $lines = rtrim($children, "\n");
+ $lines = phutil_split_lines($lines);
+ foreach ($lines as $key => $line) {
+ if (isset($line[0]) && ($line[0] == '>')) {
+ $line = '>'.$line;
+ } else {
+ $line = '> '.$line;
+ }
+ $lines[$key] = $line;
+ }
+ return implode('', $lines);
}
return phutil_tag(

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 14, 7:15 AM (4 d, 16 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7384318
Default Alt Text
D14247.id34398.diff (2 KB)

Event Timeline