-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supporting either [[url|link text]] or [[link text|url]]
- Loading branch information
1 parent
cf9d263
commit ec57746
Showing
13 changed files
with
368 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Wikilinks | ||
based_on: https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/wikilinks_title_after_pipe.md | ||
--- | ||
|
||
# Wikilinks, title after pipe | ||
|
||
Wikilinks can have one of the following forms: | ||
|
||
[[https://example.org]] | ||
[[https://example.org|title]] | ||
[[name of page]] | ||
[[name of page|title]] | ||
|
||
With this version of wikilinks, the title comes after the pipe. | ||
|
||
```````````````````````````````` example | ||
[[https://example.org]] | ||
. | ||
<p><a href="https://example.org">https://example.org</a></p> | ||
```````````````````````````````` | ||
|
||
```````````````````````````````` example | ||
[[https://example.org|title]] | ||
. | ||
<p><a href="https://example.org">title</a></p> | ||
```````````````````````````````` | ||
|
||
```````````````````````````````` example | ||
[[Name of page]] | ||
. | ||
<p><a href="Name%20of%20page">Name of page</a></p> | ||
```````````````````````````````` | ||
|
||
```````````````````````````````` example | ||
[[Name of page|Title]] | ||
. | ||
<p><a href="Name%20of%20page">Title</a></p> | ||
```````````````````````````````` | ||
|
||
HTML entities are recognized both in the name of page and in the link title. | ||
|
||
```````````````````````````````` example | ||
[[Geschütztes Leerzeichen|Über &nbsp;]] | ||
. | ||
<p><a href="Gesch%C3%BCtztes%20Leerzeichen">Über &nbsp;</a></p> | ||
```````````````````````````````` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Wikilinks | ||
based_on: https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/wikilinks_title_before_pipe.md | ||
--- | ||
|
||
# Wikilinks, title before pipe | ||
|
||
Wikilinks can have one of the following forms: | ||
|
||
[[https://example.org]] | ||
[[title|https://example.org]] | ||
[[name of page]] | ||
[[title|name of page]] | ||
|
||
With this version of wikilinks, the title comes before the pipe. | ||
|
||
```````````````````````````````` example | ||
[[https://example.org]] | ||
. | ||
<p><a href="https://example.org">https://example.org</a></p> | ||
```````````````````````````````` | ||
|
||
```````````````````````````````` example | ||
[[title|https://example.org]] | ||
. | ||
<p><a href="https://example.org">title</a></p> | ||
```````````````````````````````` | ||
|
||
```````````````````````````````` example | ||
[[Name of page]] | ||
. | ||
<p><a href="Name%20of%20page">Name of page</a></p> | ||
```````````````````````````````` | ||
|
||
```````````````````````````````` example | ||
[[Title|Name of page]] | ||
. | ||
<p><a href="Name%20of%20page">Title</a></p> | ||
```````````````````````````````` | ||
|
||
Regular links should still work! | ||
|
||
```````````````````````````````` example | ||
[Title](Name%20of%20page) | ||
. | ||
<p><a href="Name%20of%20page">Title</a></p> | ||
```````````````````````````````` | ||
|
||
HTML entities are recognized both in the name of page and in the link title. | ||
|
||
```````````````````````````````` example | ||
[[Über &nbsp;|Geschütztes Leerzeichen]] | ||
. | ||
<p><a href="Gesch%C3%BCtztes%20Leerzeichen">Über &nbsp;</a></p> | ||
```````````````````````````````` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.