Merge pull request #68 from hideheader/css-lint

Remove `eval` from css-lint
This commit is contained in:
Jason Barnabe 2015-03-13 12:28:59 -05:00
commit 3cf24400aa
2 changed files with 6 additions and 3 deletions

View File

@ -4341,9 +4341,12 @@ function PropertyValuePart(text, line, col){
this.type = "function";
this.name = RegExp.$1;
this.value = text;
} else if (/^["'][^"']*["']/.test(text)){ //string
// } else if (/^["'][^"']*["']/.test(text)){ //string
// this.type = "string";
// this.value = eval(text);
} else if (/^(["'])[^\1]*\1/.test(text)){ //string
this.type = "string";
this.value = eval(text);
this.value = /^(["'])([^\1]*)\1/.exec(text)[2];
} else if (Colors[text.toLowerCase()]){ //named color
this.type = "color";
temp = Colors[text.toLowerCase()].substring(1);

View File

@ -329,7 +329,7 @@ window.addEventListener("load", init, false);
function init() {
tE("sections-help", "helpAlt", "alt");
loadPrefs({"smart-indent": "true"});
loadPrefs({"smart-indent": true});
var params = getParams();
if (!params.id) { // match should be 2 - one for the whole thing, one for the parentheses
// This is an add