Page MenuHomePhabricator

[<!--Hidden HTML comments-->[ should not be processed the same as [[
Open, LowestPublic


[<!--Hidden HTML comments-->[ in the old parser is treated the same as [[. This means that [<!--Hidden HTML comments-->[Link]] turns into [[Link]], which seems unlikely to be the wanted result.

[[ is how you open a link, and ]] is how you close it (e.g., in a help page) is rendered as a red link to the text in between. [<!--Hidden HTML comment-->[ is how you open a link, and ]] is how you close it should behave like a <nowiki/> tag and therefore produce plain text. (Yes, it'd be simpler [for me] to use nowiki tags, but not everyone knows about those.)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 7 2016, 5:00 PM
Alsee added a subscriber: Alsee.EditedOct 7 2016, 8:16 PM

[<!--Hidden HTML comments-->[Link]] turns into [[Link]] is of course the wanted result. Comments are obviously ignored.

I suggest closing as invalid. Don't go breaking wikitext that obviously works as expected.

ssastry added a subscriber: ssastry.Oct 7 2016, 8:35 PM

Parsoid right now does not support the behaviour that the PHP parser has on this wikitext, and there isn't any plan to support it since it adds a lot of complexity.

We don't intend to break this behaviour right now in the PHP parser, but eventually, we may think about things like these in the interest of improved edit tooling (including enabling editing at granularities smaller than sections, real time editing), wikitext reasoning, and incremental performance (consider changes to templates that don't have to cause a perf. drag on the server). This is still very much at an early ideas phase now. See, (with a strawman spec @

When we get to the place of starting to move towards cleaning up oddities in wikitext, we might consider making incremental changes carefully including this one. But, we aren't there yet.

[<!--Hidden HTML comments-->[Link]] turns into [[Link]] is of course the wanted result.

Can you provide examples of anyone doing this on wiki, for a real/non-pointy reason?

Personally, I would be very surprised if there were a real need for this usage beyond contrived examples. This behaviour in the PHP parser is just a side-effect of how it parses wikitext. So, that is the reason why I am not in a rush to fix this in the PHP parser because this behavior is not explicitly coded up. It is just an accidental fallout. Parsoid's parsing code does things differently internally and so this side-effect isn't there. So, this truly falls in the undefined behavior territory.

Aklapper triaged this task as Lowest priority.Oct 8 2016, 11:45 AM