Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with markdown being passed to pylance #8768

Merged
merged 2 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/8769.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix problem with markdown cells causing off by one errors in notebooks.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@
"@jupyterlab/services": "^6.1.17",
"@lumino/widgets": "^1.28.0",
"@nteract/messaging": "^7.0.0",
"@vscode/jupyter-lsp-middleware": "^0.2.34",
"@vscode/jupyter-lsp-middleware": "^0.2.36",
"ansi-to-html": "^0.6.7",
"arch": "^2.1.0",
"bootstrap": "^4.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ export class IntellisenseProvider implements INotebookLanguageClientProvider, IE
notebookId = activeInterpreter ? this.getInterpreterIdFromCache(activeInterpreter) : undefined;
}

return interpreterId == notebookId;
// Cell also have to support python
const cell = notebook?.getCells().find((c) => c.document.uri.toString() === uri.toString());

return interpreterId == notebookId && (!cell || cell.document.languageId === 'python');
}

private getNotebookHeader(uri: Uri) {
Expand Down