Replies: 1 comment 2 replies
|
As far as I can tell However I disagree that links should be limited to URLs. It should be possible to link to files on the local file system, which can include spaces and |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR: I think that the following is a better (more uniform, easier to remember, with less gotchas) syntax for links:
<https://example.com>(this we already allow)<example link https://example.com><example link [1]><example link []>There are two problems with current markdown syntax:
[link text](url):[]or()go first, and I find those claims very believable, as I am one of those people :P()and[](see URLs with parenthesis break parser djot.js#74)There's one syntax that works great though:
<url>for autolinks URLs. It works, because URLs can't include<and>, so it is unambiguous. Another thing that URLs can't include is a space, so the idea is to extend the angled syntax to all forms of the links.<hello https://example.com>. Presence ofis what distinguishes this syntax form just the link.<hello [see here]>. This is better than markdown's[hello][see here], because its more obvious which part is the reference<hello []>I haven't thought through all the interactions with the parser, and there might be some terrible ambiguity here that would prevent this from working, but it feels like this should work, no?
If this does work, I am tempted to suggest that djot should support both
<text url>as the canonical link syntax, as well as markdown syntax for compatibility.All reactions