A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jrblevin/markdown-mode/issues/774 below:

Wiki links recognized as markdown links in todo tasks · Issue #774 · jrblevin/markdown-mode · GitHub

When using a wiki link in a todo list, the function markdown-link-p will recognize the link as a markdown reference link.

- [ ] [[myfile]] will be recognized as a markdown link by markdwon-link-p

The regex specified by markdown-regex-link-reference allows for a space between the link and d

Expected 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
  1. On a new line in any buffer, add the following to create a simple todo item with a wiki link:
    - [ ] [[mylink]]
  2. With the cursor on the link, run the command markdown-link-p, which will return t
Software Versions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4