litvis icon indicating copy to clipboard operation
litvis copied to clipboard

Local image will not preview in VSCode if code block with markdown output is in document

Open jwoLondon opened this issue 4 years ago • 0 comments

Thanks to @nickysinclair for bringing this to my attention:

In VSCode, but not Atom, the following Litvis document will not preview the image when stored locally. Examples here use triple-hat notation, but also applies to full code blocks:

^^^elm m=(3+4)^^^
![Does image show?](myImage.png)

If output is changed to raw rather than markdown, there is no problem:

^^^elm r=(3+4)^^^
![Does image show?](myImage.png)

If the image is referenced via a URL to an external CORS-compliant sever, there is no problem:

^^^elm m=(3+4)^^^
![Does image show?](https://gicentre.github.io/data/images/LillyTarn.jpg)

The fact it is VSCode specific, and only to local files suggests it might be related to the cause of https://github.com/gicentre/litvis/issues/49 although I don't know why it only applies to markdown output.

jwoLondon avatar Feb 18 '21 16:02 jwoLondon