top | item 46711853

(no title)

dpark | 1 month ago

I think it’s a natural outgrowth of the way links are commonly provided in plaintext, like so much other markdown.

> The details can be found at my website (https://example.com).

The problem with this is that if you want to render this “pretty”, there’s no way to know whether the link should be “my website” or “website” or even the whole sentence. So you add brackets to clarify.

> The details can be found at [my website](https://example.com).

There are certainly alternatives but I don’t think any of them are more natural, or memorable for that matter.

discuss

order

evnp|1 month ago

My issue is remembering that the square brackets come first, not the parentheses. I do like asciidoc's method: https://example.com for bare link, or https://example.com[pretty text] if alternate text is desired

Edit: It took me a re-read to fully understand your comment, I can see how square brackets might be an incremental addition. This may also help remember the syntax, thanks!

chrismorgan|1 month ago

Excerpt from my notes when I was deciding on a link syntax for my own lightweight markup language:

AsciiDoc doesn’t actually have a real link syntax—what it has is more or less an natural consequence of other syntax choices, but isn’t actually URL-aware, and will mangle some less common URLs. Still, what you get is mostly this kind of thing:

https://example.com[Link text]

• link:URL[Link text]

But woe betide you if you go beyond what it supports, its techniques when you need escaping are grotesque, monstrous horrors. Seriously, when you fall off the happy path, AsciiDoc is awful.

dpark|1 month ago

That asciidoc format also seems very reasonable.

The big issue isn’t specifically that markdown is wrong or right but that all these different systems are very inconsistent.