Internal links surrounded by square brackets, like [[[Main Page]]], should be parsed correctly, as <nowiki>[</nowiki>[[Main Page]]<nowiki>]</nowiki>.
Currently, this is being parsed as <nowiki>[[[Main Page]]]</nowiki> instead.
Internal links surrounded by square brackets, like [[[Main Page]]], should be parsed correctly, as <nowiki>[</nowiki>[[Main Page]]<nowiki>]</nowiki>.
Currently, this is being parsed as <nowiki>[[[Main Page]]]</nowiki> instead.
This is consistent between Parsoid and PHP:
$ echo '[[[Main Page]]]' | bin/parse.js --normalize <p>[[[Main Page]]]</p>
-vs-
$ echo '[[[Main Page]]]' | php maintenance/parse.php <p>[[[Main Page]]] </p>
So that's pretty much "how it's supposed to work". Changing this would be wikitext 2.0-scope work.
Thanks for that info! Would a good first approach be fixing the HTML to WikiText parsing?
$ echo '[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]' | node parse.js --html2wt [[[Main Page]]]
It should instead output <nowiki>[</nowiki>[[Main Page]]<nowiki>]</nowiki>