Fix anchor links in notebooks (#9848)

* Fix links using anchors issue #8428

* Address PR comments
This commit is contained in:
Barbara Valdez
2020-04-03 16:02:55 -07:00
committed by GitHub
parent d5da2f921b
commit 00cc0074f7
2 changed files with 4 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ export class LinkHandlerDirective {
// ignore
}
if (uri && this.openerService && this.isSupportedLink(uri)) {
if (uri.fragment && uri.fragment.length > 0 && uri.path === this.workbenchFilePath.path) {
if (uri.fragment && uri.fragment.length > 0 && uri.fsPath === this.workbenchFilePath.fsPath) {
this.notebookService.navigateTo(this.notebookUri, uri.fragment);
} else {
this.openerService.open(uri).catch(onUnexpectedError);