-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New lines are not stripped together with other whitespaces #3986
Comments
I guess it's something in |
OK... this is pretty bad. I wrote a couple of tests and most of them fail:
|
This turned out to be really interesting. Problems can be reproduced if there's just one whitespace between blocks or at the content boundary. But all works fine if there's more of them. There's also a small problem that we don't support autoparagraphing |
OK, there's one more important aspect, right now we turn all kind of spaces ( I think that we should do the same in CKE5 because we may cause data loss in some languages or with special spaces being used intentionally. |
Followup about |
Fix: Singular white spaces (new lines, tabs and carriage returns) will be ignored when loading data when used outside/between block elements. Closes #822. Also, the range of characters which are being normalized during DOM to view conversion was reduced to `[ \n\t\r]` to avoid losing space characters (which matches `/\s/`) that could be significant.
On conversion from DOM -> view we don't strip new line characters.
TC: Create an editor on the following contents:
In the second case you'll have a
<paragraph>\n</paragraph>
in the model.The text was updated successfully, but these errors were encountered: