Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15294561
D17772.id42735.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17772.id42735.diff
View Options
diff --git a/src/markup/engine/__tests__/remarkup/percent-block-solo.txt b/src/markup/engine/__tests__/remarkup/percent-block-solo.txt
new file mode 100644
--- /dev/null
+++ b/src/markup/engine/__tests__/remarkup/percent-block-solo.txt
@@ -0,0 +1,8 @@
+%%%
+**x**%%%
+~~~~~~~~~~
+<p class="remarkup-literal">
+<br />**x**</p>
+~~~~~~~~~~
+
+**x**
diff --git a/src/markup/engine/remarkup/blockrule/PhutilRemarkupLiteralBlockRule.php b/src/markup/engine/remarkup/blockrule/PhutilRemarkupLiteralBlockRule.php
--- a/src/markup/engine/remarkup/blockrule/PhutilRemarkupLiteralBlockRule.php
+++ b/src/markup/engine/remarkup/blockrule/PhutilRemarkupLiteralBlockRule.php
@@ -26,6 +26,13 @@
while (preg_match('/^\s*%%%/', $lines[$cursor])) {
$num_lines++;
+ // If the line has ONLY "%%%", the block opener doesn't get to double
+ // up as a block terminator.
+ if (preg_match('/^\s*%%%\s*\z/', $lines[$cursor])) {
+ $num_lines++;
+ $cursor++;
+ }
+
while (isset($lines[$cursor])) {
if (!preg_match('/%%%\s*$/', $lines[$cursor])) {
$num_lines++;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 6, 9:23 AM (23 h, 19 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7233528
Default Alt Text
D17772.id42735.diff (1 KB)
Attached To
Mode
D17772: In Remarkup, prevent "%%%" on a line from self-terminating the literal block
Attached
Detach File
Event Timeline
Log In to Comment