Skip to content

Commit 9b1de0f

Browse files
committed
added underscrore as a valid attribute character
1 parent ff2960c commit 9b1de0f

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

cssreflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
__author__ = "Erik Smartt"
88
__copyright__ = "Copyright 2010, Erik Smartt"
99
__license__ = "MIT"
10-
__version__ = "0.2.1"
10+
__version__ = "0.2.2"
1111
__usage__ = """Normal usage:
1212
cssreflow.py [INPUT_FILE_NAME] > [OUTPUT_FILE]
1313
@@ -82,7 +82,7 @@ def parse_file(file_name, config):
8282
#print "Parsing: %s" % (file_name)
8383

8484
re_statement = re.compile("^\s*([\#\.\ a-zA-Z0-9\-\_\@\:]+)\s*{(.*?)}", re.M|re.S)
85-
re_property = re.compile("([-\w]+)\s*:\s*([\\\/\:\'\"\(\)\#\%\-\.\ a-zA-Z0-9]+)\s*;", re.M|re.S)
85+
re_property = re.compile("([-\w]+)\s*:\s*([\\\/\:\'\"\(\)\#\%\_\-\.\ a-zA-Z0-9]+)\s*;", re.M|re.S)
8686

8787
# Might be able to clean this up using Python 3.1's sorted dictionary someday...
8888
data = {'__keys__':[], '__errors__':[], '__warnings__':[]}
@@ -92,7 +92,7 @@ def parse_file(file_name, config):
9292
selector = mo.group(1).strip()
9393
property_string = mo.group(2)
9494
property_set = []
95-
95+
9696
if config['verbose']: print "parse_file('%s'): Found selector: %s" % (file_name, selector)
9797

9898
if data.has_key(selector):

readme.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ Usage
2424
--silent Does not output the formatted text.
2525
--spaces Use spaces to indent. [Default: on]
2626
--tabs Use tabs to indent. [Default: off]
27+
--verbose Output lots of information about the parsing process.
2728
--version Print the version number of cssreflow being used.
2829

testfiles/tiny-clean.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ div.link_row {
4343
font-family: monospace;
4444
font-size: 350%;
4545
}
46+
.pov_block_home {
47+
background: url('../images/fb_bird-bg.png') no-repeat bottom right;
48+
}
4649
.profile_img {
4750
margin: 0.5em 0;
4851
}

testfiles/tiny-erik.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.datetime {color: #666; font-size: 80%;}
99
.fakelink {color: #06C; cursor: pointer;}
1010
.feed_link {color: #EF8736; font-size: 160%;}
11+
.pov_block_home {background: url('../images/fb_bird-bg.png') no-repeat bottom right;}
1112
.profile_img {margin: 0.5em 0;}
1213
.retweet {padding-bottom: 8px;}
1314
.smaller {font-size: 80%;}

testfiles/tiny-flat.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ a.ext {color: #06C;}
1010
#header {padding-bottom: 30px; padding-top: 10px; color: #666; background: url('../images/woot.png') no-repeat bottom right;}
1111
div.link_row {padding-bottom: 6px;}
1212
#logo {font-size: 350%; font-family: monospace;}
13+
.pov_block_home {background: url('../images/fb_bird-bg.png') no-repeat bottom right;}
1314
.profile_img {margin: 0.5em 0;}
1415
div.refresh_link {font-size: 100%; padding-bottom: 20px;}
1516
.retweet {padding-bottom: 8px;}

testfiles/tiny-in.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ div.link_row {
4343
font-size: 350%;
4444
font-family: monospace;
4545
}
46+
.pov_block_home {background: url('../images/fb_bird-bg.png') no-repeat bottom right;}
4647
.profile_img {
4748
margin:0.5em 0;
4849
}

0 commit comments

Comments
 (0)