baseUri property
Uri
get
baseUri
Uri that relative paths are resolved relative to.
If the baseUri
ends with /
, it is considered a directory and relative paths in the markdown are resolved relative to that directory:
const md = new vscode.MarkdownString(`[link](./file.js)`);
md.baseUri = vscode.Uri.file('/path/to/dir/');
// Here 'link' in the rendered markdown resolves to '/path/to/dir/file.js'
If the baseUri
is a file, relative paths in the markdown are resolved relative to the parent dir of that file:
const md = new vscode.MarkdownString(`[link](./file.js)`);
md.baseUri = vscode.Uri.file('/path/to/otherFile.js');
// Here 'link' in the rendered markdown resolves to '/path/to/file.js'
Implementation
_i3.Uri get baseUri => _i5.getProperty(
this,
'baseUri',
);
set
baseUri
(Uri value)
Implementation
set baseUri(_i3.Uri value) {
_i5.setProperty(
this,
'baseUri',
value,
);
}