Permalink
Browse files

Merge pull request #199 from miki725/master

fix for #198 including unittest
  • Loading branch information...
2 parents 7715384 + dafd5d4 commit e1c56f74b4175e4fa5c1e832bfbd16d770c8172d @cyberdelia cyberdelia committed Mar 14, 2013
Showing with 8 additions and 1 deletion.
  1. +1 −0 AUTHORS
  2. +1 −1 pipeline/compressors/__init__.py
  3. +3 −0 tests/assets/css/urls.css
  4. +3 −0 tests/tests/test_compressor.py
View
@@ -48,3 +48,4 @@ or just made Pipeline more awesome.
* Venelin Stoykov <venelin@magicsolutions.bg>
* Victor Shnayder <victor@mitx.mit.edu>
* Zenobius Jiricek <zenobius.jiricek@gmail.com>
+ * Miroslav Shubernetskiy <miroslav@miki725.com>
@@ -15,7 +15,7 @@
from pipeline.utils import to_class, relpath
from pipeline.exceptions import CompressorError
-URL_DETECTOR = r'url\([\'"]?([^\s)]+\.[a-z]+[\?\#\d\w]*)[\'"]?\)'
+URL_DETECTOR = r'url\([\'"]?([^\s)]+\.[a-z]+[^\'"\s]*)[\'"]?\)'
URL_REPLACER = r'url\(__EMBED__(.+?)(\?\d+)?\)'
DEFAULT_TEMPLATE_FUNC = "template"
@@ -9,6 +9,9 @@
.relative-url {
background-image: url(../images/sprite-buttons.png);
}
+.relative-url-querystring {
+ background-image: url(../images/sprite-buttons.png?v=1.0#foo=bar);
+}
.absolute-url {
background-image: url(/images/sprite-buttons.png);
}
@@ -115,6 +115,9 @@ def test_url_rewrite(self):
.relative-url {
background-image: url(../pipeline/images/sprite-buttons.png);
}
+.relative-url-querystring {
+ background-image: url(../pipeline/images/sprite-buttons.png?v=1.0#foo=bar);
+}
.absolute-url {
background-image: url(/images/sprite-buttons.png);
}

0 comments on commit e1c56f7

Please sign in to comment.