Skip to content

Conversation

@tats-u
Copy link
Contributor

@tats-u tats-u commented Sep 8, 2024

Fixes #261

.trim() removes non-ascii Unicode white spaces as well.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim

PS D:\cmark\out\install\x64-Debug\bin> .\cmark.exe
 全角スペース (U+3000) 全形空白 

 Em Space (U+2003) Em Space 

 NBSP (U+00A0) NBSP
^Z
<p> 全角スペース (U+3000) 全形空白 </p>
<p>?Em Space (U+2003) Em Space?</p>
<p>NBSP (U+00A0) NBSP</p>

cmark removes NBSP, but is this an expected behavior?
(? means U+2003 can't be converted to Shift_JIS, which is the OEM encoding in Japanese Windows.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

U+3000 ( ) is allowed as paragraph indentation

2 participants