telesoho / vscode-markdown-paste-image

Smartly paste for Markdown.
MIT License
135 stars 41 forks source link

Can't Paste Images to Paths Containing Whitespaces #60

Closed manuth closed 2 years ago

manuth commented 2 years ago

When pasting an image into a markdown file which contains whitespaces (like, for example /home/manuth/Test/this is a test/Test.md and hitting enter (i.e. using the default filename recommended by this extension) causes issues.

On windows, following error is reported in the Output panel:

Cannot process argument because the value of argument "name" is not valid. Change the value of the "name" argument and run the operation again.
    + CategoryInfo          : InvalidArgument: (:) [win32_save_clipboard_png.ps1], PSArgumentException
    + FullyQualifiedErrorId : Argument,win32_save_clipboard_png.ps1

On linux, following is reported:

[12-29 20:40:06] Error: target TARGETS not available

Additionally, an error message There is not an image in the clipboard. is displayed

vezaynk commented 2 years ago

I'm guessing the paths need to be passed with quotes around them.