diff --git a/lexers/style.ts b/lexers/style.ts
index 099a4bc..76d6f43 100644
--- a/lexers/style.ts
+++ b/lexers/style.ts
@@ -431,14 +431,13 @@ import { SSL_OP_NETSCAPE_CHALLENGE_BUG } from "constants";
} else if (b[aa] === "[") {
block.push("]");
spacestart();
- } else if (b[aa] === "#" && b[aa + 1] === "{") {
- out.push("#");
+ } else if ((b[aa] === "#" || b[aa] === "@") && b[aa + 1] === "{") {
+ out.push(b[aa]);
aa = aa + 1;
block.push("}");
spacestart();
} else if (b[aa] === block[block.length - 1]) {
block.pop();
- //spacestart();
}
}
out.push(b[aa]);
diff --git a/package.json b/package.json
index a76b967..c457cc9 100644
--- a/package.json
+++ b/package.json
@@ -39,5 +39,5 @@
"start": "node js/services build --browser",
"test": "node js/services validation"
},
- "version": "2.2.3"
+ "version": "2.2.4"
}
diff --git a/readme.md b/readme.md
index 00220b1..4a61718 100644
--- a/readme.md
+++ b/readme.md
@@ -2,7 +2,7 @@
[![Greenkeeper badge](https://badges.greenkeeper.io/Unibeautify/parse-framework.svg)](https://greenkeeper.io/)
-## Version 2.2.3
+## Version 2.2.4
Play around with this application [in your browser](http://prettydiff.com/parse-framework/runtimes/browsertest.xhtml).
### Todo
diff --git a/runtimes/browsertest.xhtml b/runtimes/browsertest.xhtml
index c5caa28..0748ecc 100644
--- a/runtimes/browsertest.xhtml
+++ b/runtimes/browsertest.xhtml
@@ -11,7 +11,7 @@
- parse-framework experimentation, 2.2.2
+ parse-framework experimentation, 2.2.3
- Parsing time:
diff --git a/test/samples_code/style/less_variables.txt b/test/samples_code/style/less_variables.txt
new file mode 100644
index 0000000..2b7b174
--- /dev/null
+++ b/test/samples_code/style/less_variables.txt
@@ -0,0 +1,8 @@
+.n4v-apos-spotlight-widgets.wrapper.spotlight {
+
+ &.style@{stylenr}:before,
+ &.style@{stylenr}:after {
+ background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,100 100,0 100,100' style='fill:%232d3a69%3B;fill-opacity:0.5' /%3E%3C/svg%3E");
+ box-shadow: inset 0 -1px 0 0 @sl-color-shadow-var, 0 1px 0 0 @sl-color-shadow-var;
+ }
+}
\ No newline at end of file
diff --git a/test/samples_parsed/style/less_variables.txt b/test/samples_parsed/style/less_variables.txt
new file mode 100644
index 0000000..c7334c6
--- /dev/null
+++ b/test/samples_parsed/style/less_variables.txt
@@ -0,0 +1,16 @@
+[
+{"begin":-1,"lexer":"style","lines":0,"presv":false,"stack":"global","token":".n4v-apos-spotlight-widgets.wrapper.spotlight","types":"selector"},
+{"begin":-1,"lexer":"style","lines":1,"presv":false,"stack":"global","token":"{","types":"start"},
+{"begin":1,"lexer":"style","lines":3,"presv":false,"stack":".n4v-apos-spotlight-widgets.wrapper.spotlight","token":"&.style@{stylenr}:after,&.style@{stylenr}:before","types":"selector"},
+{"begin":1,"lexer":"style","lines":0,"presv":false,"stack":".n4v-apos-spotlight-widgets.wrapper.spotlight","token":"{","types":"start"},
+{"begin":3,"lexer":"style","lines":2,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":"background-image","types":"property"},
+{"begin":3,"lexer":"style","lines":0,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":":","types":"colon"},
+{"begin":3,"lexer":"style","lines":1,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":"url(\"data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0, 100 100, 0 100, 100' style='fill:%232d3a69%3B;fill-opacity:0.5' /%3E%3C/svg%3E\")","types":"value"},
+{"begin":3,"lexer":"style","lines":0,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":";","types":"semi"},
+{"begin":3,"lexer":"style","lines":2,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":"box-shadow","types":"property"},
+{"begin":3,"lexer":"style","lines":0,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":":","types":"colon"},
+{"begin":3,"lexer":"style","lines":1,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":"inset 0 -1px 0 0 @sl-color-shadow-var, 0 1px 0 0 @sl-color-shadow-var","types":"value"},
+{"begin":3,"lexer":"style","lines":0,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":";","types":"semi"},
+{"begin":3,"lexer":"style","lines":2,"presv":false,"stack":"&.style@{stylenr}:after,&.style@{stylenr}:before","token":"}","types":"end"},
+{"begin":1,"lexer":"style","lines":2,"presv":false,"stack":".n4v-apos-spotlight-widgets.wrapper.spotlight","token":"}","types":"end"}
+]
\ No newline at end of file