Open
Description
According to the XML specification, only \t
, \n
, \r
, and
(space character) are considered whitespace and are affected by the xml:space
attribute. As it has been already raised in #768, the plugin used String#trim()
to remove whitespace characters, affecting also other non-XML whitespace characters:
- U+00A0 No-Break Space
- U+1680 Ogham Space Mark
- U+2000 En Quad
- U+2001 Em Quad
- U+2002 En Space
- U+2003 Em Space
- U+2004 Three-Per-Em Space
- U+2005 Four-Per-Em Space
- U+2006 Six-Per-Em Space
- U+2007 Figure Space
- U+2008 Punctuation Space
- U+2009 Thin Space
- U+200A Hair Space
- U+2028 Line Separator
- U+2029 Paragraph Separator
- U+202F Narrow No-Break Space
- U+205F Medium Mathematical Space
- U+3000 Ideographic Space
- U+FEFF Zero Width No-Break Space
This issue has been fixed in 6170e95. However, the fix still affects most of the characters mentioned above due to the usage of the \s
character class and the issue described originally in #768 still persists.
Probably the easiest way to fix the issue is to replace the \s
character class with the
(space character):
const content = chardata.TEXT.replaceAll(/^[\t\n\r ]+|[\t\n\r ]+$/g, "");
Metadata
Metadata
Assignees
Labels
No labels