Skip to content

Commit 4483517

Browse files
do not evaluate backticks in strings as inline-js
1 parent 257f615 commit 4483517

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/less/tree/quoted.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var Quoted = function (str, content, escaped, index, currentFileInfo) {
1010
this._index = index;
1111
this._fileInfo = currentFileInfo;
1212
};
13-
Quoted.prototype = new JsEvalNode();
13+
Quoted.prototype = new Node();
1414
Quoted.prototype.type = "Quoted";
1515
Quoted.prototype.genCSS = function (context, output) {
1616
if (!this.escaped) {
@@ -22,7 +22,7 @@ Quoted.prototype.genCSS = function (context, output) {
2222
}
2323
};
2424
Quoted.prototype.containsVariables = function() {
25-
return this.value.match(/(`([^`]+)`)|@\{([\w-]+)\}/);
25+
return this.value.match(/@\{([\w-]+)\}/);
2626
};
2727
Quoted.prototype.eval = function (context) {
2828
var that = this, value = this.value;
@@ -45,7 +45,6 @@ Quoted.prototype.eval = function (context) {
4545
} while (value !== evaluatedValue);
4646
return evaluatedValue;
4747
}
48-
value = iterativeReplace(value, /`([^`]+)`/g, javascriptReplacement);
4948
value = iterativeReplace(value, /@\{([\w-]+)\}/g, variableReplacement);
5049
value = iterativeReplace(value, /\$\{([\w-]+)\}/g, propertyReplacement);
5150
return new Quoted(this.quote + value + this.quote, value, this.escaped, this.getIndex(), this.fileInfo());

0 commit comments

Comments
 (0)