Enable Markdown Scroll Syncronization for Untitled Files (#20072)

Fixes #20070

**Bug**
Markdown scroll sync and other sync features do not work for untitled files. The root cause seems to be that the `main.js` markdown file is never loaded

**Fix**
Instead of a using a path without a scheme for `main.js`, use a `file://` path
This commit is contained in:
Matt Bierner
2017-02-06 11:20:36 -08:00
committed by GitHub
parent ebfd13baca
commit f401c72a55

View File

@@ -30,7 +30,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
}
private getMediaPath(mediaFile: string): string {
return this.context.asAbsolutePath(path.join('media', mediaFile));
return vscode.Uri.file(this.context.asAbsolutePath(path.join('media', mediaFile))).toString();
}
private isAbsolute(p: string): boolean {