Skip to content

Multiline text loses line breaks #15

@noe

Description

@noe

In notebooks that print multiple lines of text in the output of a cell, the conversion generates a single <p> element with all the text. However, by default newlines are not shown by <p> unless it has style white-space: pre-wrap, therefore, the resulting HTML page lacks the line breaks.

This problem does not happen when invoking nbconvert with --to html. There, the output is converted to a <pre> element.

I tried to find the cause in the code, but I am not familiar with the internals of nbconvert, so I couldn't find anything. Can you help? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions