Non breaking space rendered as unicode
See original GitHub issueHey - sorry but I’m not sure I understand why richtypo
renders non breaking space in unicode \xA0
rather than html nbsp;
? In my situation, I’m using element.innerHTML = richtypo.full(text)
and unicode spaces are not rendered in html.
It seems like cleanup_after
is responsible for this. I’ve forked the repo to make richtypo behave like I think it should (ie doing all transformations using unicode characters and substituting these characters with corresponding html entities after the whole process).
https://github.com/dbismut/richtypo.js
Obviously most of the tests fail 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Non-breaking space - Wikipedia
Non-breaking space. In Unicode, U+00A0 NO-BREAK SPACE ( ,  ). See also. U+202F NARROW NO-BREAK SPACE.
Read more >Non-Breaking Spaces and UTF-8 Madness | Big Mess o' Wires
The direct UTF-8 encoding for a non-breaking space (without using the entity) is C2 80. Â is Unicode character U+00C2, Latin capital ......
Read more >How to render narrow non-breaking spaces in HTML for ...
The only way for Unicode to correct it (for plain text documents only), was to add another character, namely U+202F (the NARROW NON-BREAKING ......
Read more >How to Add a Non-breaking Space with the Character ...
In HTML, you can't create an extra blank space after the space ( ) character with the spacebar. If you want 10 blank...
Read more >What is A Non-Breaking Space (NBSP) and How is it Used?
A fixed space or hard space can be particularly useful when used inside HTML or Unicode tags. For instance: “ ”. Placing the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Done:
\xAF
doesn’t actually render in HTML so I’ve kept . I’ve also added French rules with a punctuation rules that adds thin spaces before:;!?»
and after«
.@dbismut looks like you’re right