-
Notifications
You must be signed in to change notification settings - Fork 163
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
Wiki links recognized as markdown links in todo tasks #774
Comments
Original markdown specification allows one space between link text and link label. So the original author wrote such regular expression. While CommonMark does not allow spaces between them BTW removing space from its regular expression doesn't break any tests. So I think we can remove a space from it. And I think few people or no one put space between them. Reference |
I've sent PR #776 |
Thanks for resolving this so quickly, I really appreciate it |
When using a wiki link in a todo list, the function
markdown-link-p
will recognize the link as a markdown reference link.The regex specified by
markdown-regex-link-reference
allows for a space between the link and dExpected Behavior
As there is a space between the empty todo closing bracket and the link opening bracket, I would not expect this to be recognized as a markdown link. I would therefore expect
markdown-link-p
to return nil.Actual Behavior
The function
markdown-link-p
indicates that this link is a markdown link.I dug into the code a bit and saw that the regex specified in
markdown-regex-link-reference
allows for a single space between the two sets of brackets in a markdown reference link via the syntax[ ]?
. I didn't realize spaces were allowed between the two sets of brackets, so I'm unsure why this is there, but removing this from the center of the regex expression seems to fix the issue.Steps to Reproduce
- [ ] [[mylink]]
markdown-link-p
, which will returnt
Software Versions
The text was updated successfully, but these errors were encountered: