-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference links: Spaces between text and label #2602
Comments
Here we're just following the vast majority of Markdown Moreover it's explicit in John Gruber's syntax description |
I see Gruber explicitly allowed spaces between text and label. Did he left any rationale for this decision? Also, note a subtle difference: In Gruber's markdown syntax, label is a must, while pandoc (with |
+++ van-de-bugger [Dec 27 15 01:41 ]:
Not that I know of.
Yes, though Gruber implemented the shortcut style in the I agree that the presence of shortcut references makes the |
I suggest you bring up this issue at We're trying to get a rationalized specification of |
This issue was brought up about a year ago: [Why are whitespaces allowed after reference link [] [] label but not for inline links ?](http://talk.commonmark.org/t/why-are-whitespaces-allowed-after-reference-link-label-but-not-for-inline-links/447) |
I see that space is prohibited in current CommonMark spec, and Could you please clarify your intention? Will you fix markdown reader behavior or keep it for compatibility with older versions? |
I'm tempted to change this. Slightly worried that it will break some existing documents. Perhaps this should be raised on pandoc-discuss. |
I've started a thread on pandoc-discuss |
If breaking existing documents is a concern, perhaps another option would be to move support for spaces into a (disabled-by-default) extension? |
Yes, we could add an extension for this; maybe that's the
best approach.
+++ David A Roberts [Apr 30 17 01:56 ]:
… If breaking existing documents is a concern, perhaps another option
would be to move support for spaces into a (disabled-by-default)
extension?
|
Inline links:
Reference links:
Syntax of inline links is similar to syntax of reference links: two parts enclosed into brackets. The only difference that the second part of an inline link should use round brackets (aka parentheses) while the second part of a reference link should use square brackets.
However, inline links do not allow spaces between parts, while reference links do. I would say it is not consistent.
Several times I made the same mistake:
I expected
[a] [b]
would be interpreted as two shortcut reference links (because they are separated by space), but pandoc v1.15.2.1 interprets it as single link[a][b]
. The case is even more confusing if links are separated by newline:pandoc still interprets it as
[a][b]
.I would request pandoc does not allow spaces between text and label. It will look natural and consistent with inline links.
The text was updated successfully, but these errors were encountered: