sbarex / QLMarkdown

macOS Quick Look extension for Markdown files.
GNU General Public License v3.0
1.32k stars 33 forks source link

Markdown link is not recognised where there is a space in the link #142

Open kuremon opened 2 weeks ago

kuremon commented 2 weeks ago

For example if have a Markdown document with a reference to another Markdown document [Open other document](/Users/home/Desktop/My other document.md), QLMarkdown will not preview it as a link.

setanarut commented 2 weeks ago

For example if have a Markdown document with a reference to another Markdown document [Open other document](/Users/home/Desktop/My other document.md), QLMarkdown will not preview it as a link.

Wrap with < > or use %20.

[Open other document](</Users/home/Desktop/My other document.md>)

[Open other document](/Users/home/Desktop/My%20other%20document.md)
kuremon commented 2 weeks ago

Thanks. That's a good fix. But the thing is most workflows might create a space in the pathname (Copy as path in Mac, Hookmark, dropping a file, etc). Moreover the general Markdown syntax is compatible with a space in the pathname.

setanarut commented 2 weeks ago

Moreover the general Markdown syntax is compatible with a space in the pathname.

Two question

  1. Which Markdown (CommonMark, GFM etc)?
  2. Can you give me the address of the Markdown spec page so I can look at it?
setanarut commented 2 weeks ago

@kuremon I tried here and it does not support this syntax. https://spec.commonmark.org/dingus/

kuremon commented 2 weeks ago

@setanarut OK my bad I meant it is the default behaviour when using softwares like Typora, Macdown, Mark Text.