Skip to content
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

Support relative paths for markdown images in doc comments #2390

Open
jifalops opened this issue Apr 23, 2020 · 3 comments
Open

Support relative paths for markdown images in doc comments #2390

jifalops opened this issue Apr 23, 2020 · 3 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement
Milestone

Comments

@jifalops
Copy link

I'm trying to have an image appear for each IconData in our icon font, similar to Icons.foo in Flutter.

I finally got the images generated from the .ttf file, but they only show correctly in the doc-comment-popup if it uses an absolute path to the image, which means it won't work for anyone else.

// Works
/// ![icon](/home/jacob/the_project/doc/icons/icon.png|width=32,height=32)
static const icon = IconData(\x0000, fontFamily: 'MyFont');

// Does not work
/// ![icon](doc/icons/icon.png|width=32,height=32)
static const icon = IconData(\x0000, fontFamily: 'MyFont');

I have tried relative paths:

  • plain (like above)
  • with leading ./
  • with leading / (html style)
  • using .../../.. as necessary to navigate from the file to the root of the project
  • using <img src="">
@DanTup
Copy link
Member

DanTup commented Apr 23, 2020

Thanks for the report! The markdown here is rendered by VS Code, so this would be best fixed there (the same bug exists in other languages - the relative path is resolved from the VS Code application folder). I've opened an issue you can put a 👍 on here:

microsoft/vscode#95947

@DanTup DanTup added the upstream in vs code / lsp / dap Needs changing in VS Code, LSP or DAP protocols/libraries label Apr 23, 2020
@DanTup DanTup added this to the On Deck milestone Apr 23, 2020
@DanTup
Copy link
Member

DanTup commented May 4, 2020

The VS Code issue was closed as a dupe of microsoft/vscode#86564. I'll close this as a dupe too, as I believe once fixed in VS Code, it'll just work here. Thanks!

@DanTup
Copy link
Member

DanTup commented May 26, 2022

I suspect this won't get done without a contribution to the VS Code LSP Client, so re-opening this as a placeholder/reminder.

@DanTup DanTup reopened this May 26, 2022
@DanTup DanTup added is enhancement in editor Relates to code editing or language features and removed upstream in vs code / lsp / dap Needs changing in VS Code, LSP or DAP protocols/libraries labels May 26, 2022
@DanTup DanTup added this to the v3.44.0 milestone May 26, 2022
@DanTup DanTup changed the title Relative path resolution for markdown images in doc comments. Support relative paths for markdown images in doc comments May 26, 2022
@DanTup DanTup added the blocked on vs code / lsp / dap Requires a change in VS Code to progress label Jun 22, 2022
@DanTup DanTup modified the milestones: v3.44.0, Backlog Jun 22, 2022
@DanTup DanTup added in lsp/analysis server Something to be fixed in the Dart analysis server and removed blocked on vs code / lsp / dap Requires a change in VS Code to progress labels Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants