Skip to content

Parse atx heading will remove Unicode whitespace like \u3000,but html don't remove \u3000 #414

@Godsix

Description

@Godsix

"<h1>\u3000\u3000abc</h1>" -> "# \u3000\u3000abc" -> "<h1>abc</h1>"
"<h1>&nbsp;&nbsp;abc</h1>" -> "# \xa0\xa0abc" -> "<h1>abc</h1>"
because str.strip remove not only ascii whitespace like \r\n\t\x20, but also unicode space like &nbsp;&emsp;&ensp; and so on.
str.strip(string.whitespace) can solve it.

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