mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Fix file relative path link (#181475)
* Fix for file link with relative path * Removed redundant comments * Simplify fix to accomodate Windows paths --------- Co-authored-by: Sidebail <vova.vatsurin@gmail.com> Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
This commit is contained in:
parent
abd11f059e
commit
5af7860ca2
|
@ -237,9 +237,9 @@ export class LinkDetector extends Disposable implements IEditorContribution {
|
|||
const fsPath = resources.originalFSPath(parsedUri);
|
||||
|
||||
let relativePath: string | null = null;
|
||||
if (fsPath.startsWith('/./')) {
|
||||
if (fsPath.startsWith('/./') || fsPath.startsWith('\\.\\')) {
|
||||
relativePath = `.${fsPath.substr(1)}`;
|
||||
} else if (fsPath.startsWith('//./')) {
|
||||
} else if (fsPath.startsWith('//./') || fsPath.startsWith('\\\\.\\')) {
|
||||
relativePath = `.${fsPath.substr(2)}`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue