Markdown rendering in output · Issue #12895 · ipython/ipython · GitHub
Skip to content

Markdown rendering in output #12895

Description

@linceaerian

Hello maintainers,

Sorry to bother you, I'm not sure if my problem is due to either IPython / Jupyter / Gitlab, so maybe it will be closed soon.
I'm encountering the same problem than in some issues ex: jupyter/nbconvert#145 (and a lot of other on stackoverflow which use markdown to render math functions).

I want to dynamically render some markdown output in a Python cell but all I get when using display(Markdown(<string>) is <IPython.core.display.Markdown object> as shown below:

image

The code used is:

        name = '## Working on %s' % host["host"]
        display({'text/plain': name, 'text/markdown': name}, raw=True)
        display(Markdown(name))

I'm using the text/plain workaround for the moment which display the text but I would like to have the output rendered if possible :)

I would expect that the process for display.Markdown would render the markdown string into HTML but it seems it does not... or am I missing some call ?

For a markdown object in display I get:

image
with outpout source for the notebook as:
image

While a panda table in display is rendered as;

image
image

Sorry to bother you and thanks for reading until the end (I cannot seems to find any relevant information from stackoverflow or others T.T).

Regards

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions