Skip to content

Allow configuring a base uri for MarkdownString #142051

Closed
@mjbvz

Description

@mjbvz

Feature request

Allow configuring a base uri that is used when rendering the contents of a MarkdownString. This uri would be used when resolving relative paths that appear as links or image links within the markdown string

Example use case

const md = new vscode.MarkdownString(`
[link](toSiblingFile.md)

![img](./image/from/dir.gif)
`);

md.baseUri = vscode.window.activeTextEditor.document.uri

When rendered, link and img should both resolve to files next to the currently active file

Related issues

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions