`[text][]` is shorthand for `[text][text]` – should `[text]()` mean `[text](text)`?
tmke8 opened this issue · comments
I could see this being useful for relative links:
You can find the PDF here: [paper.pdf]().
rendered as
<p>You can find the PDF here: <a href="paper.pdf">paper.pdf</a>.</p>
(spaces should be turned into %20
in href=
)
Also, personal wikis could use this syntax to link to other files: (though this doesn't take into account file name extensions...)
Honey is produced by [bees]().
Note that the autolink syntax doesn't work for this:
<paper.pdf>
gets rendered as
<p><paper.pdf></p>
jgm/gitit has long used [bees]()
as a syntax for wikilinks.
See also #26
I think that it is probably wisest to leave the handling of empty links to renderers/filters since applications may differ as to what is the most sensible use for them: gitit uses them for wikilinks, so that [Link Text]()
is short for [Link Text](some/path/link-text.html)
, my Pandoc filter uses them for local links so that [Link Text]()
is short for [Link Text](#link-text)
(and [Link Text](path#prefix#-suffix)
is short for [Link Text](path#prefixlink-textsuffix)
where each of path
/prefix
/suffix
is optional — especially useful for [heading about thing](##s)
! — and [Link Text](some/path.*)
is short for [Link Text](some/path.<ext>)
where the value of <ext>
is declared in the metadata) and there may be other uses still.