-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[2.0.3] getSemanticHTML
is broken
#4509
Comments
Introduced wtih Commit 07b68c9. The end result of replacing all spaces with An alternative implementation of editor.js converHTML() that preserves whitespace might replace all but one consecutive space character with be: if (blot instanceof TextBlot) {
const escapedText = escapeText(blot.value().slice(index, index + length));
return escapedText.replaceAll(/ +/g, (match) => " ".repeat(match.length - 1) + " ")
} A work around (which replaces the last consecutive quill.getSemanticHTML().replaceAll(/((?: )*) /g, '$1 ') |
I think this is bad. Sometimes I need to write Can we revert to the amazing |
I think @luin can help us here Thanks |
This is quite critical bug to our project. This changes how the values are saved to database. Luckily this didn't hit production before noticing. |
Steps for Reproduction
Expected behavior:
The text in the editor is
a text with multiple spaces
.getSemanticHTML
returns<p>a text with multiple spaces</p>
. Which is wrong - the semantics of the text has changed.Actual behavior:
See above.
Platforms:
Any.
Version:
2.0.3
The text was updated successfully, but these errors were encountered: