Skip to content

IPython display indentation of HTML causes problems when converting to markdown #9301

@yaph

Description

@yaph

When I embed an iframe in a notebook using the IFrame class the resulting cell is indented, because of the indentation in the source file. When I convert the notebook to markdown with nbconvert and then convert it back to HTML, the iframe tag is interpreted as a code block, because of the indentation. Using the Audio display would have a similar result because of the indentation in _repr_html_() I assume.

Possible solutions would be to put the format strings on one long line in the display.py source or remove the indentation. Not sure whether this is the right project to report this, or whether it is something that should be handled in the nbconvert project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions