From 8d3fd9cc3be413eef1a7ff3a7094779f934dcafa Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Nov 2017 03:19:31 +0300 Subject: [PATCH] fixups for a58f42de (backtick) and 05677d93 (copy changed meta) --- edit/source-editor.js | 3 ++- js/usercss.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/edit/source-editor.js b/edit/source-editor.js index 47438e07..ef7754ab 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -169,7 +169,8 @@ function createSourceEditor(style) { dirty.clear('sourceGeneration'); } if (codeIsUpdated === false || sameCode) { - style.enabled = newStyle.enabled; + // copy changed meta anyway + style = deepCopy(newStyle); dirty.clear('enabled'); updateMeta(); return; diff --git a/js/usercss.js b/js/usercss.js index 406f991d..24b7903c 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -334,7 +334,7 @@ var usercss = (() => { function unquote(s) { const q = s[0]; - if (q === s[s.length - 1] && (q === '"' || q === "'")) { + if (q === s[s.length - 1] && (q === '"' || q === "'" || q === '`')) { // http://www.json.org/ return s.slice(1, -1).replace( new RegExp(`\\\\([${q}\\\\/bfnrt]|u[0-9a-fA-F]{4})`, 'g'),