From 4e4f0501d2774b622380fe75f76dc16849be63b9 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 22 Feb 2018 18:34:15 +0300 Subject: [PATCH] fixup: add the empty line correctly --- edit/source-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/source-editor.js b/edit/source-editor.js index 6db47d40..fd53f1b1 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -124,7 +124,7 @@ function createSourceEditor(style) { chromeSync.getLZValue('usercssTemplate').then(code => { code = code || DEFAULT_CODE; // strip the last dummy section if any, add an empty line followed by the section - style.sourceCode = code.replace(/@-moz-document[^{]*\{[^}]*\}\s*$|\s+$/g, '\n\n') + section; + style.sourceCode = code.replace(/@-moz-document[^{]*\{[^}]*\}\s*$|\s+$/g, '') + '\n\n' + section; cm.startOperation(); cm.setValue(style.sourceCode); cm.clearHistory();