Skip to content

Commit

Permalink
Workaround issue with markdown lost on edit
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Nov 20, 2023
1 parent cf904ba commit d6d13ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/jupyterlab-lsp/src/edits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ export class EditApplicator {
if (!editor) {
throw Error('Editor is not accessible');
}
if (editor.host.closest('.jp-MarkdownCell')) {
// Workaround for https://github.com/jupyter-lsp/jupyterlab-lsp/issues/1008
// briefly, the rewrite for JupyterLab 4.0 added Markdown cell support, but they
// are extracted without trace in the top-level document. Here we avoid editing
// any markdown cell. Instead the clean solution would be to add an anchor marker
// to the top-level document.
return 0;
}
// TODO: should accessor present the model even if editor is not created yet?
const model = editor.model;

Expand Down

0 comments on commit d6d13ac

Please sign in to comment.