Commit e1c56f74 by Timothée Peignier

Merge pull request #199 from miki725/master

fix for #198 including unittest
parents 77153842 dafd5d4f
...@@ -48,3 +48,4 @@ or just made Pipeline more awesome. ...@@ -48,3 +48,4 @@ or just made Pipeline more awesome.
* Venelin Stoykov <venelin@magicsolutions.bg> * Venelin Stoykov <venelin@magicsolutions.bg>
* Victor Shnayder <victor@mitx.mit.edu> * Victor Shnayder <victor@mitx.mit.edu>
* Zenobius Jiricek <zenobius.jiricek@gmail.com> * Zenobius Jiricek <zenobius.jiricek@gmail.com>
* Miroslav Shubernetskiy <miroslav@miki725.com>
...@@ -15,7 +15,7 @@ from pipeline.storage import default_storage ...@@ -15,7 +15,7 @@ from pipeline.storage import default_storage
from pipeline.utils import to_class, relpath from pipeline.utils import to_class, relpath
from pipeline.exceptions import CompressorError 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+)?\)' URL_REPLACER = r'url\(__EMBED__(.+?)(\?\d+)?\)'
DEFAULT_TEMPLATE_FUNC = "template" DEFAULT_TEMPLATE_FUNC = "template"
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
.relative-url { .relative-url {
background-image: url(../images/sprite-buttons.png); background-image: url(../images/sprite-buttons.png);
} }
.relative-url-querystring {
background-image: url(../images/sprite-buttons.png?v=1.0#foo=bar);
}
.absolute-url { .absolute-url {
background-image: url(/images/sprite-buttons.png); background-image: url(/images/sprite-buttons.png);
} }
......
...@@ -115,6 +115,9 @@ class CompressorTest(TestCase): ...@@ -115,6 +115,9 @@ class CompressorTest(TestCase):
.relative-url { .relative-url {
background-image: url(../pipeline/images/sprite-buttons.png); 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 { .absolute-url {
background-image: url(/images/sprite-buttons.png); background-image: url(/images/sprite-buttons.png);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment