From e2ce5669a2e0be2194ec37c095fea6003b5be650 Mon Sep 17 00:00:00 2001 From: Jeremy Schomery Date: Wed, 8 Feb 2017 17:23:38 +0330 Subject: [PATCH] adapting edit.js with the new csslint-worker.js (v1.0.4) --- edit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edit.js b/edit.js index ec13281a..162f97cd 100644 --- a/edit.js +++ b/edit.js @@ -1349,7 +1349,7 @@ function fromMozillaFormat() { var replaceOldStyle = this.name == "import-replace"; popup.querySelector(".close-icon").click(); var mozStyle = trimNewLines(popup.codebox.getValue()); - var parser = new exports.css.Parser(), lines = mozStyle.split("\n"); + var parser = new parserlib.css.Parser(), lines = mozStyle.split("\n"); var sectionStack = [{code: "", start: {line: 1, col: 1}}]; var errors = "", oldSectionCount = editors.length; var firstAddedCM; @@ -1357,7 +1357,7 @@ function fromMozillaFormat() { parser.addListener("startdocument", function(e) { var outerText = getRange(sectionStack.last.start, (--e.col, e)); var gapComment = outerText.match(/(\/\*[\s\S]*?\*\/)[\s\n]*$/); - var section = {code: "", start: backtrackTo(this, exports.css.Tokens.LBRACE, "end")}; + var section = {code: "", start: backtrackTo(this, parserlib.css.Tokens.LBRACE, "end")}; // move last comment before @-moz-document inside the section if (gapComment && !gapComment[1].match(/\/\*\s*AGENT_SHEET\s*\*\//)) { section.code = gapComment[1] + "\n"; @@ -1378,7 +1378,7 @@ function fromMozillaFormat() { }); parser.addListener("enddocument", function(e) { - var end = backtrackTo(this, exports.css.Tokens.RBRACE, "start"); + var end = backtrackTo(this, parserlib.css.Tokens.RBRACE, "start"); var section = sectionStack.pop(); section.code += getRange(section.start, end); sectionStack.last.start = (++end.col, end);