-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest changes broke image pasting on macOS #58
Comments
Mea culpa. I have accidentally removed support for it in #54 by removing this codepath. It will be fixed soon. |
You can test the fix by running git clone https://github.com/knyzorg/vscode-markdown-paste-image
cd vscode-markdown-paste-image
npm i
npx vsce package
code --install-extension ./vscode-markdown-paste-image-0.15.2.vsix |
@knyzorg The error is a bit different now:
|
What happens when you try running |
~/.vscode/extensions/telesoho.vscode-markdown-paste-image-0.15.2/res
❯ osascript /Users/marcin/.vscode/extensions/telesoho.vscode-markdown-paste-image-0.15.2/res/mac.applescript
~/.vscode/extensions/telesoho.vscode-markdown-paste-image-0.15.2/res It executes properly (I passed no arguments like in your example). |
@telesoho Do you have a macbook you can test with? I'm not sure why this is happening. It seems to work from CLI but not from the extension. |
@knyzorg I think there is some issue with the choice of executor. I logged the |
@marcinjahn I did some changes. Can you pull and try again? |
@knyzorg Yes, that works. Actually, I started creating a branch with that fix, but you were faster. Also, you fixed more switch cases than that single place. |
@knyzorg Even though the functionality works, the log is a bit confusing:
"No script exists"? |
The way this extension is designed, it expects to have multiple scripts for each OS. One for
The only one we have for Mac is pasting images. So the way it works is it fails detect the clipboard type for Mac and falls back to attempting to extract plain text, which if fails, runs the paste image script. I'm not very good with Macs, so someone will need to write the other scripts. |
Yeah, I see that in code. I'm not good neither, today was the first time I saw actual AppleScript code :) |
The fix has been merged |
Having the same issue on macOS Monterey on version 0.18.6. Copy past image works as expected but download image results in output
|
Since the last update I cannot paste images into markdown anymore on macOS Monterey.
I see the following logs:
A couple days ago it worked perfectly fine.
The text was updated successfully, but these errors were encountered: