Correctly format statements

Allow uppercase reserved @names
This commit is contained in:
jtm
2012-02-02 18:41:04 +00:00
parent 96afff7e57
commit 6e29a991c7
6 changed files with 6 additions and 3 deletions

View File

@@ -99,6 +99,7 @@ class LessLexer:
t.type = 'css_dom'
t.value = t.value
elif c == '@':
v = v.lower()
if v in LessLexer.reserved:
t.type = LessLexer.reserved[v]
else:

View File

@@ -8,7 +8,7 @@
from .process import Process
class Statement(Process):
format = "%(identifier)s%(ws)s%(value)s;%(nl)s"
format = "%(identifier)s %(value)s;%(nl)s"
def parse(self, scope):
""" Parse Node

View File

@@ -1,4 +1,5 @@
@charset "utf-8";
@CHARSET "utf-8";
div {
color: black;
}

View File

@@ -1,4 +1,4 @@
@charset"utf-8";div{color:black;}
@charset "utf-8";@CHARSET "utf-8";div{color:black;}
div{width:99%;}
*{min-width:45em;}
h1, h2 > a > p, h3{color:none;}

View File

@@ -1 +1 @@
@import'some.css.file.css';@import'some/other.css.file.CSS';.import{color:red;width:6px;height:9px;}
@import 'some.css.file.css';@import 'some/other.css.file.CSS';.import{color:red;width:6px;height:9px;}

View File

@@ -1,4 +1,5 @@
@charset "utf-8";
@CHARSET "utf-8";
div { color: black; }
div { width: 99%; }