<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><wikilinkdestination="https://example.org"embed="false"><textxml:space="preserve">https://example.org</text></wikilink></paragraph></document>
$ comrak -e wikilinks-title-before-pipe -t commonmark -t xml
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><wikilinkdestination="https://example.org"embed="false"><textxml:space="preserve">title</text></wikilink></paragraph></document>
$ comrak -e wikilinks-title-before-pipe -t commonmark -t xml
<p><ahref="Name%20of%20page"data-wikilink="true">Name of page</a></p>
[[Name of page|Name%20of%20page]]
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><wikilinkdestination="Name of page"embed="false"><textxml:space="preserve">Name of page</text></wikilink></paragraph></document>
$ comrak -e wikilinks-title-before-pipe -t commonmark -t xml
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><wikilinkdestination="Name of page"embed="false"><textxml:space="preserve">Title</text></wikilink></paragraph></document>
Regular links should still work!
$ comrak -e wikilinks-title-before-pipe -t commonmark -t xml
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><linkdestination="Name%20of%20page"title=""><textxml:space="preserve">Title</text></link></paragraph></document>
HTML entities are recognized both in the name of page and in the link title.
$ comrak -e wikilinks-title-before-pipe -t commonmark -t xml
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><wikilinkdestination="Geschütztes Leerzeichen"embed="false"><textxml:space="preserve">Über &nbsp;</text></wikilink></paragraph></document>
Escaping characters is supported
$ comrak -e wikilinks-title-before-pipe -t commonmark -t xml
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><wikilinkdestination="https://example.org"embed="false"><textxml:space="preserve">foo[]bar</text></wikilink></paragraph></document>
$ comrak -e wikilinks-title-before-pipe -t commonmark -t xml