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
F14057824: D14344.diff
Sun, Nov 17, 7:08 AM
F14026401: D14344.id34617.diff
Fri, Nov 8, 1:16 AM
F14026400: D14344.id.diff
Fri, Nov 8, 1:16 AM
F14026398: D14344.diff
Fri, Nov 8, 1:16 AM
F14001212: D14344.id.diff
Fri, Oct 25, 5:16 AM
F13958886: D14344.id34617.diff
Oct 14 2024, 4:50 PM
Unknown Object (File)
Oct 9 2024, 2:38 AM
Unknown Object (File)
Oct 9 2024, 2:38 AM

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?