Skip to content

widont line break/newline behavior #38

@ryneeverett

Description

@ryneeverett

If a string ends with a <br> and a single word, widont does nothing:

>>> widont('blah<br>blah')
'blah<br>blah'

This makes sense to me. But if a string ends with a <br>\n, widont replaces the newline with a &nbsp;:

>>> widont('blah<br>\nblah')
'blah<br>&nbsp;blah'

This doesn't seem right. While the first would render:

blah
blah

the second would render:

blah
 blah

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