Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sidebar/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ClassicEditor.create(document.querySelector('#editor'), {
if (isFocused || name === 'rename' || name === 'insert') {
const content = editor.getData();
if (!ignoreNextLoadEvent && content !== undefined &&
content.replace(/ /g, ' ') !== INITIAL_CONTENT) {
content.replace(/ /g, ' ') !== INITIAL_CONTENT.replace(/\s\s+/g, ' ')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l10n may add extra spaces and this will not match, watch out for that, we add the .replace

ignoreTextSynced = true;
if (content.length > 15000) {
console.error('Maximum notepad size reached:', content.length); // eslint-disable-line no-console
Expand Down