Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
prettydiff committed Nov 18, 2018
1 parent 104666a commit 19c4068
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lexers/style.ts
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -39,5 +39,5 @@
"start": "node js/services build --browser",
"test": "node js/services validation"
},
"version": "2.2.3"
"version": "2.2.4"
}
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion runtimes/browsertest.xhtml
Expand Up @@ -11,7 +11,7 @@
<link href="../runtimes/browsertest.css" media="all" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1>parse-framework experimentation, <span class="version">2.2.2</span></h1>
<h1>parse-framework experimentation, <span class="version">2.2.3</span></h1>
<div>
<ul>
<li id="timeparse">Parsing time: <span></span></li>
Expand Down
8 changes: 8 additions & 0 deletions 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;
}
}
16 changes: 16 additions & 0 deletions 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"}
]

0 comments on commit 19c4068

Please sign in to comment.