Open lghio opened 1 year ago
@lghio there's already logic in the code to handle encoding for spaces. To make that work, you need to enable the config item encodePath
and set its value to urlEncodeSpace
.
I understand the settings but it only works on the imagePath, it does not work on the imageName and I want to use a relative name, so I can't use the imagePath
Oh I think you're right, it's encoding applied to the imageFilePath
: https://github.com/mushanshitiancai/vscode-paste-image/blob/fb795320aedea24a03e5c7d43d1059e4080277b3/src/extension.ts#L383-L387
It looks like it would be a relatively easy fix to add an encoding for the filename specifically. That's what you're asking for, right?
Yes that's it ;-) When do you think that could be implemented?
I've no idea, I don't have any access to this repo, just a developer using this extension :-)
I'm using this pattern to insert the relative link to my images
and unfortunately the spaces aren't encoded.
Could you add an option to encode the variables "imageFileName" ?
Thank you for this great extension