Page MenuHomePhabricator

Remarkup text rendering bug
Closed, ResolvedPublic

Description

The following text: (http://php.net/manual/en/book.gettext.php)[[ URL | name ]] renders quite wrongly:

(http://php.net/manual/en/book.gettext.php)name

(pre-fix: (name" target="_blank">http://php.net/manual/en/book.gettext.php)name )

<p>(
  <a href="http://php.net/manual/en/book.gettext.php)&lt;a href=" w="" url="" "="" class="phriction-link">name</a>" target="_blank"&gt;http://php.net/manual/en/book.gettext.php)
  <a href="/w/url/" class="phriction-link">name</a>
</p>

This: (http://php.net/manual/en/book.gettext.php) [[ URL | name ]] renders just fine:
(http://php.net/manual/en/book.gettext.php) name

Note the space between the link-in-parens and the remarkup link brackets.

Accidentally discovered this in Legalpad but it's happening here in the Maniphest preview too so I imagine it's a deeper issue.

Related Objects

StatusAssignedTask
Spiteepriestley
ResolvedNone

Event Timeline

Firehed raised the priority of this task from to Needs Triage.
Firehed updated the task description. (Show Details)
Firehed added a project: Remarkup.
Firehed added a subscriber: Firehed.

Yeah, this is a bad interaction between the (...)[...] rule and the [[...]] rule. I think the [[...]] rule should have precedence here.

My guess earlier was slightly off, but correct in spirit; the bare hyperlink rule was too aggressive.

You can use this command to fix existing blocks by dropping the caches:

phabricator/ $ ./bin/cache purge --purge-remarkup

I ran that on this host, so the task description now renders more reasonably but makes significantly less sense.