widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.62k stars 105 forks source link

NameError: name 'pymdownx' is not defined in `solara.Markdown` #617

Closed egormkn closed 2 weeks ago

egormkn commented 3 weeks ago

Hi!

solara.Markdown throws a NameError when pymdownx is not installed. There is a has_pymdownx flag that shows if the extensions library is installed, but it is not used in extension configuration:

https://github.com/widgetti/solara/blob/fa1e807496145b85d6588c24b219b0519f9ce5cf/solara/components/markdown.py#L361

It can be fixed by installing the extensions manually:

pip install pymdown-extensions
iisakkirotko commented 2 weeks ago

Should work correct in the new solara version!