There's an animated gif on the main page here that suggests a Markdown("""....""") function can be invoked within hydrogen to render markdown fragments. I've been unable to reproduce that, seeing instead a NameError (name 'Markdown' is not defined) when I try. FWIW there is a markdown library visible to the Python interpreter, i.e. import markdown
then markdown.version gives "2.6.6" via Hydrogen evaluation. What am I missing ?
The markdown function is available via IPython.display.
Add this line to your script:
from IPython.display import Markdown
That's great! Works fine, thanks. Can I assume it works from internal/bundled markdown and I didn't need to install it separately?
Perhaps "from IPython.display import Markdown" is obvious to everyone else but this is a super-handy feature so if it could be made more explicit somewhere, that'd be nice...
Thanks again anyway
That's great! Works fine, thanks. Can I assume it works from internal/bundled markdown and I didn't need to install it separately?
Yes it's bundled with Hydrogen. There's no need to install something separate.
Perhaps "from IPython.display import Markdown" is obvious to everyone else but this is a super-handy feature so if it could be made more explicit somewhere, that'd be nice...
You can read more about IPython.display here.
I personally rarely use the markdown capabilities. If you find any issues or improvements feel free to create a new issue.
Most helpful comment
The markdown function is available via
IPython.display.Add this line to your script: