GWicke has submitted this change and it was merged.

Change subject: (bug 38514) Parse the pipe-trick (most renditions) properly
......................................................................


(bug 38514) Parse the pipe-trick (most renditions) properly

There is still one form of "pipe trick" missing from this patch,
but the usual forms are both working:

* [[page (context)|]] -> [[page (context)|page]]
* [[page, context|]] -> [[page, context|page]]

The functionality was copied almost verbatim from Parser.php.

The only remaining form to implement is:

[[|page]] -> [[page|page]]

I feel like there needs to be a chat about that, since A) it would
need some changes in the tokenizer (recognizing links without URLs
is one), but also it seems like this is just a long form of the
standard [[page]], so we may want to not implement the longer form.

Round-tripping also included, but it was relatively simple (just
not rendering the content if pipetrick was set).

Change-Id: I62dbee54c03f9e26ed830ba77eb4b6ab999a6371
---
M js/lib/ext.core.LinkHandler.js
M js/lib/mediawiki.WikitextSerializer.js
M js/lib/pegTokenizer.pegjs.txt
3 files changed, 38 insertions(+), 9 deletions(-)

Approvals:
  GWicke: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/17896
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I62dbee54c03f9e26ed830ba77eb4b6ab999a6371
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to