fixup: add the empty line correctly
This commit is contained in:
parent
4bb1a191cc
commit
4e4f0501d2
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user