shurcooL-legacy / atom-markdown-format

Formats your Markdown text on save.

Home Page:https://atom.io/packages/markdown-format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image behavior

cakebake opened this issue · comments

First of all, thank´s for this very useful package :)

I've noticed that when you save, brackets which were enclosed to the src of the image will be removed.

Example:

![local image](<rattlesnake image.jpg>)

http://spec.commonmark.org/0.22/#link-destination

That makes me problems in Issue cakebake/markdown-themeable-pdf#9

Hi, thanks for reporting this. I'll try to look into it, and I think it might be fixable.

As an alternative, would using ![local image](rattlesnake%20image.jpg) work?

I think it works. I saved the test file with another editor ;) thanks for fast response!

Can you elaborate on the problem? I've tested this out locally, and despite the < and > characters being removed, the image link continues to render correctly using blackfriday:

![local image](rattlesnake image.jpg)
<p><img src="rattlesnake image.jpg" alt="local image" /></p>

Some parser make it, others do not. ;) In the specification, these characters are, however, provided and encouraged. :) http://spec.commonmark.org/0.22/#link-destination

Rendering with markdown-it is not working... markdown-it/markdown-it#162

Fair enough.

I do not currently plan to support all of CommonMark spec. I'm not sure I like it because it's way too large and complicated IMO.

Blackfriday does not currently support it fully either.

So I have to make ad-hoc decisions. In this case, I think the value is not worth the effort (it already works fine with Markdown renderers I care about, and for others you can use %20 for space), and I'm pretty swamped with other work atm so I don't have resources to address this, sorry. I'll close because I'm not planning to resolve it.