Skip to content

Relative image paths don't work in markdown in hovers #95947

Closed

Description

@DanTup

Given the following TypeScript:

/**
 * This is my class
 *
 * # Example!
 *
 * ![foo](../images/foo.jpg)
 * */
class Foo { }

And an image at ../images/foo.jpg, the image won't render:

Screenshot 2020-04-23 at 08 31 41

The path is being resolved from the application folder:

file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/images/foo.png

This would be useful to support (without requiring each language to parse the markdown to find images and rewrite the paths). For example in Flutter we show images with previews of colors - these work because they're generated by us, but users may wish to do the same for their own classes:

Screenshot 2020-04-23 at 08 35 03

Activity

  1. usernamehw commented on Apr 23, 2020

    @usernamehw
    Contributor

    /assign mjbvz

  2. mjbvz commented on Apr 23, 2020

    @mjbvz
    Contributor

    Duplicate of #86564 I believe

  3. added
    *duplicate
    on Apr 23, 2020
  4. DanTup commented on Apr 23, 2020

    @DanTup
    ContributorAuthor

    Ah thanks - I did search but failed to find!

  5. locked and limited conversation to collaborators on Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicate

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions