File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1-
21<!doctype html>
32< html >
43 < head >
@@ -15,6 +14,18 @@ <h1>CodeMirror: LESS mode</h1>
1514 < form > < textarea id ="code " name ="code ">
1615/* Some LESS code */
1716
17+ video {
18+ background-image:url('paper.gif');
19+ }
20+
21+ .pre_class {
22+ width: 500px;
23+ height: 250px;
24+ background-image: url(sheep.png), url(betweengrassandsky.png);
25+ background-position: center bottom, left top;
26+ background-repeat: no-repeat;
27+ }
28+
1829@color: #4D926F;
1930
2031#header {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ CodeMirror.defineMode("less", function(config) {
5454 else if ( / [ ; { } : \[ \] ( ) ] / . test ( ch ) ) { //added () char for lesscss original was [;{}:\[\]]
5555 if ( ch == ":" ) {
5656 stream . eatWhile ( / [ a c t i v e | h o v e r | l i n k | v i s i t e d ] / ) ;
57- if ( stream . current ( ) . match ( / [ a c t i v e | h o v e r | l i n k | v i s i t e d ] / ) ) {
57+ if ( stream . current ( ) . match ( / a c t i v e | h o v e r | l i n k | v i s i t e d / ) ) {
5858 return ret ( "tag" , "tag" ) ;
5959 } else {
6060 return ret ( null , ch ) ;
@@ -93,6 +93,8 @@ CodeMirror.defineMode("less", function(config) {
9393 return ret ( "number" , "unit" ) ;
9494 } else if ( inTagsArray ( stream . current ( ) ) ) { // lesscss match html tags
9595 return ret ( "tag" , "tag" ) ;
96+ } else if ( ( stream . peek ( ) == ")" || stream . peek ( ) == "/" ) && stream . current ( ) . indexOf ( '.' ) !== - 1 ) {
97+ return ret ( "string" , "string" ) ; //let url(logo.png) without quotes and froward slash return as string
9698 } else {
9799 return ret ( "variable" , "variable" ) ;
98100 }
You can’t perform that action at this time.
0 commit comments