Skip to content

Unicode whitespace is stripped from leading and trailing positions in markdown paragraphs #310

Description

@tim-evans

Following up on #307, we should handle a longer list of unicode whitespace characters:

Name Code Point Entity Size
No Break Space \u00A0   👉 👈
En Quad \u2000   👉 👈
Em Quad \u2001   👉 👈
En Space \u2002   👉 👈
Em Space \u2003   👉 👈
Thick Space \u2004   👉 👈
Mid Space \u2005   👉 👈
Six-per-em Space \u2006   👉 👈
Figure Space \u2007   👉 👈
Punctuation Space \u2008   👉 👈
Thin Space \u2009   👉 👈
Hair Space \u200A   👉 👈
Zero Width Space \u200B ​ 👉​👈
Narrow No-break Space \u202F   👉 👈
Medium Mathematical Space \u205F   👉 👈
Ideographic Space \u3000   👉 👈
Zero Width No-break Space \uFEFF  👉👈

I think this is a fairly exhaustive list of spaces, but if any more should be added, please comment 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 BugThis is identified as a bug or is fixing a bug

    Type

    No type

    Fields

    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