bustle / mobiledoc-kit

A toolkit for building WYSIWYG editors with Mobiledoc
https://bustle.github.io/mobiledoc-kit/demo/
MIT License
1.55k stars 150 forks source link

Section parser: Newlines in content can insert double spaces #707

Closed kevinansfield closed 4 years ago

kevinansfield commented 4 years ago

Discovered when copy/pasting using Firefox.

If parsed HTML contains newline characters, eg: (trailing spaces indicated with _ for easier visibility).

More of us have come to understand that our digital technologies are not
 always bringing out our best natures. People woke up to the fact that_
our digital platforms are being coded by people who don’t have our best_
interests at heart. This is the decade when, finally, the “tech_
backlash” began.

Then the generated mobiledoc can contain double spaces, eg:

"More of us have come to understand that our digital technologies are not  always bringing out our best natures. People woke up to the fact that  our digital platforms are being coded by people who don’t have our best  interests at heart. This is the decade when, finally, the “tech  backlash” began."