fix search action (#14937)

* fix search action

* remove book version from book tree item
This commit is contained in:
Barbara Valdez
2021-04-01 11:16:32 -07:00
committed by GitHub
parent 37af88e265
commit a00ffa0469
4 changed files with 7 additions and 9 deletions

View File

@@ -498,7 +498,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
public async searchJupyterBooks(treeItem?: BookTreeItem): Promise<void> {
let folderToSearch: string;
if (treeItem && treeItem.sections !== undefined) {
folderToSearch = treeItem.uri ? getContentPath(treeItem.version, treeItem.book.root, path.dirname(treeItem.uri)) : getContentPath(treeItem.version, treeItem.book.root, '');
folderToSearch = treeItem.uri ? getContentPath(treeItem.book.version, treeItem.book.root, path.dirname(treeItem.uri)) : getContentPath(treeItem.book.version, treeItem.book.root, '');
} else if (this.currentBook && !this.currentBook.isNotebook) {
folderToSearch = path.join(this.currentBook.contentFolderPath);
} else {