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 {
65
65
66
66
this . notebook_as_editor = new NotebookAsSingleEditor (
67
67
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' ? '^[%!].*' : '' ,
70
71
// the pass is used to silence the linters in places where the line would otherwise be filtered out
71
72
this . language == 'python' ? 'pass' : ''
72
73
// TODO: ideally we would allow to substitute code for magics, etc
You can’t perform that action at this time.
0 commit comments