revolunet / sublimetext-markdown-preview

markdown preview and build plugin for sublime text 2/3
MIT License
2.31k stars 362 forks source link

Local file file path with spaces are not handled correctly when converting to HTML #412

Closed Takiro closed 6 years ago

Takiro commented 6 years ago

When using an image tag and the local path contains spaces the generated HTML IMG-Tag is not working since spaces are not handled correctly.

Example markdown:

![my image](file:///C:/Users/Username/Desktop/Foo and Bar/pics/img.png)

Results in:

<img alt="my image" src="file:///C:/Users/Username/Desktop/Foo" title="and Bar/pics/img.png">

Putting the the file path in quotes or double quotes does not help but manually replacing all the spaces with %20 does.

Would be nice if the package could handle white spaces on its own.

facelessuser commented 6 years ago

This is an upstream Python Markdown issue. A matter of fact, it is something that I've specifically addressed in Python Markdown quite recently. A new release has not been made for that, then it would have to also be released as a dependency in Sublime.

So short answer is that it is coming.

facelessuser commented 6 years ago

As mentioned this is an upstream issue that has been addressed, but a new release has not yet be cut over at Python Markdown. I will close this issue as there is no actionable item for us to address here. New supported repo location will be at https://github.com/facelessuser/MarkdownPreview moving forward.