jupyter-book / thebe

Turn static HTML pages into live documents with Jupyter kernels.
https://thebe.readthedocs.io
BSD 3-Clause "New" or "Revised" License
395 stars 68 forks source link

Markdown outputs are not rendering in ipywidgets #741

Open stevejpurves opened 7 months ago

stevejpurves commented 7 months ago

Describe the bug

context When I do use any of the examples that have markdown cell output https://executablebooks.github.io/thebe/ipywidgets.html

expectation I expected markdown to be rendered

bug But instead I get plain text happens

problem This is a problem for people!

Reproduce the bug

run this and look at the output of the cookies example https://executablebooks.github.io/thebe/ipywidgets.html

List your environment

No response

stevejpurves commented 7 months ago

The issue stems from changes to the IRendermimeRegistry interface in jupyterlab.

Now this requires a separate markdown renderer, even to render markdown mimetype outputs and seems to be now inextricably linked with codemirror editor languages, even though it's a concern of output rendering for mimebundles.

We'll need to supply a markdown renderer of some form to the rendermime registry, using the marked renderer as-per jupyterlab will mean pulling in @juptyerlab/codemirror or building out a stub implementation of IEditorLanguageRegistry :( . Probably it's better to consider a different/better parser and use that? maybe with the need to wrap it, potentially we can just use mystjs here cc @rowanc1?