showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.19k stars 1.56k forks source link

Unexpected image url format with makeMarkdown() #925

Closed hanson2010 closed 2 years ago

hanson2010 commented 2 years ago

In the definition of Markdown syntax, image URL is surrounded by (), but not (<>).

Why is it ![Alt text](</path/to/img.jpg>) instead of ![Alt text](/path/to/img.jpg)?

tivie commented 2 years ago

Both syntaxes are correct and were supported by the original markdown parser made by Gruber, even if he didn't document it.

makeMarkdown uses this syntax because it's safer: weird image links ( such as /path/to/weird.image.name(. ) will produce wrong markdown.