jupyter-book/thebe

Remove dependency on `@jupyterlab/codemirror`

Opened this issue · 0 comments

thebe uses Mode.ensure() from the @juptyerlab/codemirror package in order to load mode files on demand. That function has been removed in jlab 4.x resulting in the pin here.

However, we can avoid loading that package altogether by implementing the ensure behaviour here. Also this can be much simpler than the jlab implementation as we know that the incoming mode to be a string indicating language name (we might also consider supporting the extension, as that is a standard CodeMirror lookup) rather than the variety of arguments that jlab has to deal with.