shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.48k stars 173 forks source link

failed to render png of compiled md when defaut assets path #17

Closed tmori3y2 closed 7 years ago

tmori3y2 commented 7 years ago

Hi @shd101wyy !

see here.

https://github.com/tmori3y2/MPE-Test/tree/master/vscode/import

shd101wyy commented 7 years ago

Hi @tmori3y2

Which markdown file?

shd101wyy commented 7 years ago

Okay I see, will be fixed.

shd101wyy commented 7 years ago

Oh I see, this is not a bug. /assets means the images will be exported to the assets directory relative to your project directory. If you want to save it to your current directory, you need to write it as ./assets or assets.
Thanks

tmori3y2 commented 7 years ago

I'm sorry I did not have enough explanation.

test_import001.md is compiled md of test_import_001.md.

https://raw.githubusercontent.com/tmori3y2/MPE-Test/master/vscode/import/test_import_001_.md

MPE generated the relative windows style path "..\..\assets\ed7441fe68d9fd503e0cd6ee55402c5e0.png".

Please note that the path separator is not escaped.

MPE preview window failed to render png of test_import001.md because the resolved path of "..\..\assets\ed7441fe68d9fd503e0cd6ee55402c5e0.png" is "....\assets\ed7441fe68d9fd503e0cd6ee55402c5e0.png".

tmori3y2 commented 7 years ago

Since the Windows style separator also has a problem with the Atom version of MPE, it may be better to replace '\' with '/'.

shd101wyy commented 7 years ago

Understood!

On Mon, Jul 10, 2017 at 1:26 AM tmori3y2 notifications@github.com wrote:

Since the Windows style separator also has a problem with the Atom version of MPE, it may be better to replace '\' with '/'.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/17#issuecomment-314016606, or mute the thread https://github.com/notifications/unsubscribe-auth/AB0gf_J9SSeX6OVVJNHOYuW1sCY1VqRzks5sMcQrgaJpZM4OOlIR .

shd101wyy commented 7 years ago

@tmori3y2 Should be fixed now!

BTW, I just created a core library called MUME, and my plan is to let both vscode and atom versions share the same core.

Thanks :)

tmori3y2 commented 7 years ago

Thanks a lot!