Steven Heynderickx wrote on 10 Nov 2009 15:47
Originally suggested by pieterh on 24 September 2009.
This set of changes cleans up the inconsistencies between different types of links, and adds some necessary new functionality.
We have two kinds of links (to pages, ignoring other kinds of URI link such as
- [[[...]]] is principally used for wiki references
- [...] is used for general-purpose links
Link grammar:
link = wiki-link | href-link
wiki-link = "[[[" [ "*" ] explicit-target | implicit-target [ "|" ] [ link-text ] "]]]"
href-link = "[" [ "*" ] explicit-target [ "|" ] [ link-text ] "]"
implicit-target = [ category ":" ] page-name
page-name = string # With no category name
explicit-target = anchor
| absolute-uri
| relative-uri
| page-fullname
| email-link
| wikidot-link
| interwiki-link
anchor = "#" [ text-string ]
absolute-uri = scheme domain "/" implicit-target [ page-args ] [ anchor ]
scheme = "http://" | "https://" | "ftp://" | "gopher://" | "news://" | "mailto:" | "mms://"
relative-uri = "/" page-fullname [ page-args ] [ anchor ]
page-fullname = category ":" page-name
email-link = recipient "@" email-domain
wikidot-link = ":" site-name [ ":" implicit-target [ page-args ] [ anchor ] ]
interwiki-link = ( "wikipedia:" | "google:" | "dictionary:" ) name
page-args = ( "/" name "/" value ) ...
Notes:
- If the implicit-target or explicit-target contains spaces, the separator "|" is mandatory.
- Spaces in a URI are encoded as %20 in the actual HTML.
- The wiki-link syntax creates backlinks, while the href-link syntax creates linkbacks (yes, confusing!)
- The default link-text for the wiki-link syntax is the page title.
- The default link-text for the href-link syntax is the name.
- The wikidot link with no page fullname generates name.wikidot.com or a custom domain name.
We discourage direct comments on this thread: to discuss it, please start a sub-thread.