less 3.10.2 → 3.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,8 @@ export default {
21
21
  return n;
22
22
  },
23
23
  extract: function(values, index) {
24
- index = index.value - 1; // (1-based index)
24
+ // (1-based index)
25
+ index = index.value - 1;
25
26
 
26
27
  return getItemsFromNode(values)[index];
27
28
  },
@@ -1,11 +1,10 @@
1
1
  import Quoted from '../tree/quoted';
2
2
  import Anonymous from '../tree/anonymous';
3
- import Quote from '../tree/quoted';
4
3
  import JavaScript from '../tree/javascript';
5
4
 
6
5
  export default {
7
6
  e: function (str) {
8
- return new Quote('"', str instanceof JavaScript ? str.evaluated : str.value, true);
7
+ return new Quoted('"', str instanceof JavaScript ? str.evaluated : str.value, true);
9
8
  },
10
9
  escape: function (str) {
11
10
  return new Anonymous(
package/lib/less/index.js CHANGED
@@ -42,7 +42,7 @@ export default (environment, fileManagers) => {
42
42
  * It's not clear what should / must be public and why.
43
43
  */
44
44
  const initial = {
45
- version: [3, 10, 2],
45
+ version: [3, 10, 3],
46
46
  data,
47
47
  tree,
48
48
  Environment,
@@ -107,8 +107,10 @@ const Parser = function Parser(context, imports, fileInfo) {
107
107
  i = parser.i;
108
108
  result = parsers[p]();
109
109
  if (result) {
110
- result._index = i + currentIndex;
111
- result._fileInfo = fileInfo;
110
+ try {
111
+ result._index = i + currentIndex;
112
+ result._fileInfo = fileInfo;
113
+ } catch (e) {}
112
114
  returnNodes.push(result);
113
115
  }
114
116
  else {
@@ -2,6 +2,7 @@ import Node from './node';
2
2
  import Variable from './variable';
3
3
  import Property from './property';
4
4
 
5
+
5
6
  class Quoted extends Node {
6
7
  constructor(str, content, escaped, index, currentFileInfo) {
7
8
  super();
@@ -13,6 +14,7 @@ class Quoted extends Node {
13
14
  this._fileInfo = currentFileInfo;
14
15
  this.variableRegex = /@\{([\w-]+)\}/g;
15
16
  this.propRegex = /\$\{([\w-]+)\}/g;
17
+ this.allowRoot = escaped;
16
18
  }
17
19
 
18
20
  genCSS(context, output) {
@@ -50,6 +52,7 @@ class Quoted extends Node {
50
52
  }
51
53
  value = iterativeReplace(value, this.variableRegex, variableReplacement);
52
54
  value = iterativeReplace(value, this.propRegex, propertyReplacement);
55
+
53
56
  return new Quoted(this.quote + value + this.quote, value, this.escaped, this.getIndex(), this.fileInfo());
54
57
  }
55
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "less",
3
- "version": "3.10.2",
3
+ "version": "3.10.3",
4
4
  "description": "Leaner CSS",
5
5
  "homepage": "http://lesscss.org",
6
6
  "author": {