Page MenuHomePhabricator

Re-order remarkup rule blocks to pass tests on PHP7
AbandonedPublic

Authored by Mnkras on Oct 26 2015, 7:07 PM.
Tags
None
Referenced Files
F13089016: D14344.diff
Thu, Apr 25, 1:38 AM
Unknown Object (File)
Fri, Apr 19, 3:49 PM
Unknown Object (File)
Thu, Apr 11, 9:24 AM
Unknown Object (File)
Mon, Apr 8, 4:25 AM
Unknown Object (File)
Fri, Apr 5, 10:06 PM
Unknown Object (File)
Thu, Mar 28, 2:19 PM
Unknown Object (File)
Mar 4 2024, 3:53 PM
Unknown Object (File)
Mar 4 2024, 3:53 PM

Details

Summary

Ref T9640. When running arc unit --everything for some reason the following test would fail P1877

This is probably the wrong solution, im wondering if some regex stuff changed in PHP7 because PhutilRemarkupCodeBlockRule should not parse anything in the file used for the test.

Test Plan

arc unit --everything

Diff Detail

Repository
rPHU libphutil
Branch
php7-fix-remarkup-test
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8426
Build 9685: arc lint + arc unit

Event Timeline

Mnkras retitled this revision from to Re-order remarkup rule blocks to pass tests on PHP7.
Mnkras updated this object.
Mnkras edited the test plan for this revision. (Show Details)

I would expect this to give us the wrong result for:

<space><space>%%%Four score and...

...which should be a code block but will maybe be picked up as a literal now?

Yea, I copied out the regex that is used in the code block rule, the weird thing is, that PHP7 and PHP5 outputs don't differ

https://3v4l.org/MTgPs

This is weird

epriestley added a reviewer: epriestley.

Just kicking this out of my queue until we figure out what the real issue is. It's vaguely possible this is actually the right fix, but I suspect not, and we should better understand the root cause.

This revision now requires changes to proceed.Nov 2 2015, 4:38 PM

I guess the question is:

Is the content of that text-file really supposed to to be a literal block, or should it be a code block? (the indented line)

If its supposed to be the code block, then something is wrong in PHP7, if its supposed to be be the literal block, then something is wrong in PHP5, it all depends on what the expected functionality is.

%%%[[http://hello | world]] **bold**%%%

  %%%[[http://hello | world]] **bold**%%%
~~~~~~~~~~
<p class="remarkup-literal">[[http://hello | world]] **bold**</p>

<p class="remarkup-literal">[[http://hello | world]] **bold**</p>
~~~~~~~~~~
[[http://hello | world]] **bold**

[[http://hello | world]] **bold**

Should line 2/3 be block or literal?