Page MenuHomePhabricator

Escaping for properties in remarkup rules like "{nav ...}" is not clearly explained
Open, WishlistPublic

Description

I recently came across this, trying to indicate some data which has an identifier "=C124". I was trying to be stylistic and use the navigation component

{nav =C124}

However this renders as:

Live ExampleScreenshot
Screen Shot 2016-09-19 at 5.02.04 PM.png (30×21 px, 6 KB)

Workaround
Use the {key =C124} stylin'
=C124

Event Timeline

Try:

{nav name=C124}

To produce:

C124

This is approximately explained in the documentation?

We could conceivably special-case this since setting an empty attribute to a value isn't meaningful, I suppose.

It's an off-case for sure. We have a ton of data identifiers which all end with an equals-sign and a couple letters/numbers, which we abbreviate when referring to the datasets. I was actually trying to render the equals sign as part of the nav sequence and not just C124.

Oh, right. That works, but I think isn't documented:

{nav name="=C124"}

Produces:

=C124

And you can technically:

{nav name="name=\{nav name=\"C124\"\}"}

...to produce:

name={nav name="C124"}

...and such.

Ohhh nice, thank you I missed that
=C124

epriestley renamed this task from Remarkup navigation component is not able to have text starting with equals sign to Escaping for properties in remarkup rules like "{nav ...}" is not clearly explained.Sep 19 2016, 9:44 PM
epriestley triaged this task as Wishlist priority.
epriestley edited projects, added Documentation; removed Bug Report.