Skip to content

Commit af9c353

Browse files
fingolfinKristofferC
authored andcommitted
Markdown: don't allow space between parts of a link (#59977)
In Markdown, links are written as `[desc](URL)`, and no space is allowed between `]` and `(`. However, Julia's Markdown parser explicitly accepted it (not clear why). This may break links in a few package manuals, but the fix will be easy in each case (just remove the extra spaces). But being more consistent with most (all??) other Markdown implementations seems more important to me; it is very surprising when one copies basic Markdown that works fine elsewhere into a Julia package manual and it suddenly is treated completely differently. Resolves JuliaDocs/Documenter.jl#2681 (cherry picked from commit fe30573)
1 parent 8d74078 commit af9c353

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

stdlib/Markdown/src/Common/inline.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ function link(stream::IO, md::MD)
9696
startswith(stream, '[') || return
9797
text = readuntil(stream, ']', match = '[')
9898
text nothing && return
99-
skipwhitespace(stream)
10099
startswith(stream, '(') || return
101100
url = readuntil(stream, ')', match = '(')
102101
url nothing && return

0 commit comments

Comments
 (0)