visual-studio-code - VS Code 中 IntelliSense 中的本地图像
问题描述
我在 VS Code 中使用 TypeScript。我将 JSDoc 用于我的评论,因此 IntelliSense 经常将评论显示为工具提示。我正在使用 Markdown 来格式化这些评论,包括图片。大多数情况下它有效,但有一个问题。我只看到来自 HTTP 服务器的图像。它不会显示来自本地文件系统的图像。
这是我希望看到的。 但是,这仅在我将图像存储在 Web 服务器上时才有效。
这是这些图片背后的代码的简短版本。您可以在此处找到上下文中的确切代码。
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(
) {}
//..
}
第一个例子是破碎的。第二个可以正确显示图像,但它使用了令人讨厌的解决方法。我希望能够将图像和源文件保存在同一目录中。我希望能够将它们包含在同一个提交中。那可能吗?
注意:VS Code 能够在自己的窗口中显示此文件。我可以直接链接到 README.md 中的这个本地文件。我们正在查看完全相同的图像,我只是将我的项目推送到了 github。
您可以从这张图片或github中看到*.png
和*.ts
文件位于同一目录中。
有没有人使这个功能工作? 知道为什么它不适合我吗?
解决方案
推荐阅读
- javascript - 为什么每个生产部署都需要清除浏览器缓存
- java - Onesignal 和 play-services-ads 错误:无法在单个 dex 文件中容纳请求的类
- docker - 进程可以在 Windows 上写入 docker 卷,而不是在 Ubuntu 上
- android - ViewPager2 在键盘出现时调整大小
- javascript - 如何更改嵌入文本的字体大小
- jsf - 检查复选框菜单中的选定项目
- sql - 尝试将外键添加到现有表时出现模糊错误
- kubernetes - 强制 kubernetes 入口 cname 格式
- react-native - 如何在 React Native 中加入 2 个堆栈导航器
- php - laravel 5.5 禁止/停用用户