LOCAL images in IntelliSense in VS Code

Viewed 370

I'm using TypeScript in VS Code. I'm using JSDoc for my comments, so IntelliSense often displays the comments as a tooltip. And I'm using Markdown to format those comments, including images. Mostly it works, but there's one problem. I only see images from an HTTP server. It will not display images from the local file system.

This is what I'd expect to see. this is what I'd expect However, this only works if I store the image on a web server.

This is what I see when I try to access a local file. Includes Broken Image

Here's a short version of the code behind those pictures. You can find the exact code, in context, here.

class IntelliSenseTest {
  /**
   * `to` and `from` assume that we are moving around the shape counter-clockwise,
   * i.e. the mathematically positive direction.
   * ![explanation of dots](./kite-dart-dots.png)
   */
  constructor(
  ) {}
}

export class Segment {
    /**
     * `to` and `from` assume that we are moving around the shape counter-clockwise,
     * i.e. the mathematically positive direction.
     * ![explanation of dots](https://raw.githubusercontent.com/TradeIdeasPhilip/penrose-tiling/master/docs/kite-dart-dots.png)
     */
    constructor(
    ) {}
    //..
  } 

The first example is the broken one. The second one displays the image properly but it uses a nasty workaround. I want to be able to save the image and the source file in the same directory. I want to be able to include them in the same commit. Is that possible?

Note: VS Code is able to display this file in its own window. And I can link directly to this local file in README.md. And we are looking at the exact same image, I just pushed my project to github.

You can see from this image or from github that the *.png and *.ts files are in the same directory. VS code file list

Has anyone made this feature work? Any idea why it's not working for me?

0 Answers
Related