File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,9 @@ export class NotebookAdapter extends JupyterLabWidgetAdapter {
6565
6666 this . notebook_as_editor = new NotebookAsSingleEditor (
6767 this . widget ,
68- // filter out line magics if the language is python
69- this . language == 'python' ? '^%.*' : '' ,
68+ // TODO: find better, language agnostic solution (or at least verify that kernel is IPython, not plain Python)
69+ // temporary workaround: filter out IPython line magics and shell assignments if the language is python
70+ this . language == 'python' ? '^[%!].*' : '' ,
7071 // the pass is used to silence the linters in places where the line would otherwise be filtered out
7172 this . language == 'python' ? 'pass' : ''
7273 // TODO: ideally we would allow to substitute code for magics, etc
You can’t perform that action at this time.
0 commit comments