Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit aaad032

Browse files
authored
Fix that thing when there are extra spaces in initial content (#673) r=@Natim
Fixes #623
1 parent 345b7eb commit aaad032

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sidebar/panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ClassicEditor.create(document.querySelector('#editor'), {
7070
if (isFocused || name === 'rename' || name === 'insert') {
7171
const content = editor.getData();
7272
if (!ignoreNextLoadEvent && content !== undefined &&
73-
content.replace(/ /g, ' ') !== INITIAL_CONTENT) {
73+
content.replace(/ /g, ' ') !== INITIAL_CONTENT.replace(/\s\s+/g, ' ')) {
7474
ignoreTextSynced = true;
7575
if (content.length > 15000) {
7676
console.error('Maximum notepad size reached:', content.length); // eslint-disable-line no-console

0 commit comments

Comments
 (0)