From 16226268d0e6b41b1f872d1923e176c2ff2e754b Mon Sep 17 00:00:00 2001 From: vladikoff Date: Fri, 9 Feb 2018 11:00:43 -0500 Subject: [PATCH] Fix that thing when there are extra spaces in initial content Fixes #623 --- src/sidebar/panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sidebar/panel.js b/src/sidebar/panel.js index 431ad971b..c0588cf0c 100644 --- a/src/sidebar/panel.js +++ b/src/sidebar/panel.js @@ -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, ' ')) { ignoreTextSynced = true; if (content.length > 15000) { console.error('Maximum notepad size reached:', content.length); // eslint-disable-line no-console