Open stevengj opened 7 years ago
Julia Markdown doesn't follow the CommonMark spec. According to docs (http://docs.julialang.org/en/release-0.5/manual/documentation/#markdown-syntax) Julia has footnote references using[^link]
syntax:
julia> md"""
a [^link] here and an [inline link](http://fake.url)
[^link]: http://fake.url
""".content
1-element Array{Any,1}:
Base.Markdown.Paragraph(Any["a ",Base.Markdown.Footnote("link",nothing)," here and an ",Base.Markdown.Link(Any["inline link"],"http://fake.url")," ",Base.Markdown.Footnote("link",nothing),": http://fake.url"])
It would be nice to add link reference definitions as well. I see pandoc has both footnotes and link references.
Yes, would be nice to have. We should try follow CommonMark where possible/appropriate, though there have been some features that we needed that just haven't been standardised in CM yet (tables, I think is one of them).
@mpastell, are you planning on working on this?
Not at the moment, I will see if I find the time to do it.
Looks like it shouldn't be too difficult to add this to the parser by modifying the footnote code, but I haven't looked into what needs to be done with the writers.
This would be really great. It's a lot easier to maintain a list of reference links than wade through long markdown files (e.g. docs) to update potentially duplicated inline links.
The Markdown parser does not seem to recognize link reference definitions, unlike inline links:
(See e.g. JuliaLang/IJulia.jl#493 for where this came up.)