Skip to content

Commit

Permalink
Version 0.2.7 - Added a call to LimitTimer.reset() to fix a bug in wh…
Browse files Browse the repository at this point in the history
…ich the LimitTimer never expired.

Add two more color regexes which allow the case in which hex is be combined with a pseudo class e.g. ``hffffff-hover`` or ``hfff-before``.
  • Loading branch information
nueverest committed Aug 19, 2016
1 parent 5c34c82 commit 3ec56f9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
3 changes: 3 additions & 0 deletions blowdrycss/colorparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@


class ColorParser(object):
""" Extracts plain text, hexidecimal, rgb, rgba, hsl, and hsla color codes from encoded class selectors.
"""
def __init__(self, property_name='', value=''):
self.color_regexes = property_regex_dict['color']
self.property_name = property_name
Expand Down
5 changes: 3 additions & 2 deletions blowdrycss/datalibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def __init__(self):
'color': {
r"(h[0-9a-fA-F]{3} ?)$", r"(h[0-9a-fA-F]{6} ?)$",
r"(h[0-9a-fA-F]{3}-i ?)$", r"(h[0-9a-fA-F]{6}-i ?)$",
r"(h[0-9a-fA-F]{3}.*?-i ?)$", r"(h[0-9a-fA-F]{6}.*-i ?)$",
r"(h[0-9a-fA-F]{3}-i.*? ?)$", r"(h[0-9a-fA-F]{6}-i.*? ?)$",
r"(h[0-9a-fA-F]{3}-.*? ?)$", r"(h[0-9a-fA-F]{6}-.* ?)$",
r"(h[0-9a-fA-F]{3}-.*?-i ?)$", r"(h[0-9a-fA-F]{6}-.*-i ?)$",
r"(h[0-9a-fA-F]{3}-i-.*? ?)$", r"(h[0-9a-fA-F]{6}-i-.*? ?)$",
},
}

Expand Down
8 changes: 4 additions & 4 deletions blowdrycss/unit_tests/test_colorParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ def test_is_valid_hex_Integer_case(self):
'h0ff48f', 'hfff', ' hABC123 ', 'hfdec78', 'h000', ' hbcd ', '5px solid hd0d', '5px-hidden-hd0d987',
'13px dashed hd0d',
'h000-i', 'h484848-i',
'hf2f-hover-i', 'hF3F-i-hover', 'color-hf4f-hover-i', 'color-hf5f-i-hover',
'hf2f2f2-hover-i', 'hf3f3f3-i-hover', 'color-hf4f4f4f-hover-i', 'color-hf5f5f5-i-hover',
'hd9d-hover', 'hd9d9d8-hover', 'hf2f-hover-i', 'hF3F-i-hover',
'hf2f2f2-hover-i', 'hf3f3f3-i-hover',
]
expected = [
0, 0, 1, 0, 0, 1, 10, 11,
12,
0, 0,
0, 0, 6, 6,
0, 0, 6, 6,
0, 0, 0, 0,
0, 0,
]
color_parser = ColorParser()
for i, value in enumerate(values_true):
Expand Down
12 changes: 5 additions & 7 deletions readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ Version Changelog

| See ``version.py`` for full changelog.
|
| **0.2.5** -- Fixed two regex errors: URIs (http://, ftp://) resemble inline JS comments (//) and ``://``
needs to be removed first and foremost. XHTML multi--line comment syntax ``<%-- ... --%>`` needs to be removed
before ``<%...%>`` standard XHTML decorated expressions are removed since the regex is non-greedy and
an XHTML expression decorated with ``<%...%>`` may exist within the multi-line comment. This results in an
early non-greedy match between ``<%--`` and the closing ``%>`` of a commented out expression.
Which contrasts with the desired closing substring of ``--%>``.
|
| **0.2.6** -- Created a filehandler.FileModificationComparator which runs under watchdog mode. This
feature dramatically improves efficiency by only adding classes based on the files that changed
before the last run of blowdrycss. The current CSS class selectors are now stored within the
Expand All @@ -58,6 +51,11 @@ Version Changelog

PEP8 and typo corrections.

| **0.2.7** -- Added a call to LimitTimer.reset() to fix a bug in which the LimitTimer never expired.
Add two more color regexes which allow the case in which hex is be combined with a pseudo class.
e.g. ``hffffff-hover`` or ``hfff-before``.

Why the name blowdrycss?
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,15 @@ class declarations, CssClass, and ``*Attributes.Add("class", "bold padding-42");
PEP8 and typo corrections.
| **0.2.7** -- Added a call to LimitTimer.reset() to fix a bug in which the LimitTimer never expired.
Add two more color regexes which allow the case in which hex is be combined with a pseudo class.
e.g. ``hffffff-hover`` or ``hfff-before``.
"""
__author__ = 'chad nelson'

__project__ = 'blowdrycss'

__version__ = '0.2.6'
__version__ = '0.2.7'

__release__ = __version__ + 'b2'

0 comments on commit 3ec56f9

Please sign in to comment.