coc-markdown-preview-enhanced
coc-markdown-preview-enhanced copied to clipboard
[BUG] Image preview and link jumping with a relative/absolute pathname work unexpectedly
Describe the bug
I made it a markdown demo to describe the bug. However, I not sure how to upload markdown code without previewing it. So, I attached the file following. Sry, my bad. main.md
Result from CocInfo
## versions
vim version: VIM - Vi IMproved 8.2 8023455
node version: v17.7.1
coc.nvim version: 0.0.80-ccd0b050e0
coc.nvim directory: /Users/dehan/.vim/plugged/coc.nvim
term: dumb
platform: darwin
## Log of coc.nvim
2022-03-18T20:18:12.369 WARN (pid:67086) [attach] - Plugin not ready when received "highlight" []
2022-03-18T20:18:12.461 INFO (pid:67086) [services] - registered service "highlight"
2022-03-18T20:18:12.607 INFO (pid:67086) [plugin] - coc.nvim initialized with node: v17.7.1 after 234ms
2022-03-18T20:18:24.623 INFO (pid:67086) [attach] - receive notification: highlight []
2022-03-18T20:18:24.713 WARN (pid:67086) [extension:coc-prettier] - jsxBracketSameLine is deprecated.
2022-03-18T20:18:24.800 INFO (pid:67086) [attach] - receive notification: runCommand [ 'markdown-preview-enhanced.openPreview' ]
2022-03-18T20:18:25.192 INFO (pid:67086) [attach] - receive notification: highlight []
2022-03-18T20:18:36.681 INFO (pid:67086) [attach] - receive notification: highlight []
2022-03-18T20:18:44.505 INFO (pid:67086) [attach] - receive notification: showInfo []
2022-03-18T20:18:44.717 INFO (pid:67086) [attach] - receive notification: highlight []
2022-03-18T20:19:01.600 INFO (pid:67086) [attach] - receive notification: highlight []
2022-03-18T20:19:02.724 INFO (pid:67086) [attach] - receive notification: highlight []
2022-03-18T20:19:03.409 INFO (pid:67086) [attach] - receive notification: runCommand [ 'markdown-preview-enhanced.openPreview' ]
2022-03-18T20:19:03.570 INFO (pid:67086) [attach] - receive notification: highlight []
2022-03-18T20:19:07.405 INFO (pid:67086) [attach] - receive notification: showInfo []
Steps to reproduce Steps to reproduce the behavior:
- execute
gvim
-
:CocCommand markdown-preview-enhanced.openPreview
- See error
Expected behavior
Images displaying and links jumping correctly.
Screenshots

Additional context None
Hi @DehanLUO. Actually, This is a limitation of vscode webview, which restricts webview to accessing files outside of the project for security reasons.
So when mume goes to resolve the absolute path of the image, it will change it to a relative path.
Unfortunately, we have to wait for mume to solve this issue.
https://github.com/shd101wyy/mume/issues/132 https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/215
Hi @DehanLUO. Actually, This is a limitation of vscode webview, which restricts webview to accessing files outside of the project for security reasons.
So when mume goes to resolve the absolute path of the image, it will change it to a relative path.
Unfortunately, we have to wait for mume to solve this issue.
shd101wyy/mume#132 shd101wyy/vscode-markdown-preview-enhanced#215
Thank you for the detail you went into mume. Have a good day :)