Hydrogen: Missing instructions on how to use Markdown inline

Created on 3 Aug 2016  路  4Comments  路  Source: nteract/hydrogen

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 ?

Most helpful comment

The markdown function is available via IPython.display.
Add this line to your script:

from IPython.display import Markdown

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neurotronix picture neurotronix  路  4Comments

Mungoid picture Mungoid  路  4Comments

nils-werner picture nils-werner  路  3Comments

lgeiger picture lgeiger  路  3Comments

DannyDannyDanny picture DannyDannyDanny  路  3Comments