QLMarkdown icon indicating copy to clipboard operation
QLMarkdown copied to clipboard

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

Open kuremon opened this issue 1 year ago • 5 comments

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.

kuremon avatar Sep 14 '24 17:09 kuremon

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)

setanarut avatar Sep 14 '24 23:09 setanarut

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.

kuremon avatar Sep 15 '24 15:09 kuremon

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 avatar Sep 15 '24 15:09 setanarut

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

setanarut avatar Sep 15 '24 15:09 setanarut

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

kuremon avatar Sep 16 '24 07:09 kuremon