fixups for a58f42de (backtick) and 05677d93 (copy changed meta)

This commit is contained in:
tophf 2017-11-27 03:19:31 +03:00
parent 841e556f42
commit 8d3fd9cc3b
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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'),