summaryrefslogtreecommitdiffstats
path: root/theme-compiler
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2013-01-02 14:56:29 +0000
committerVaadin Code Review <review@vaadin.com>2013-01-02 14:56:29 +0000
commit89f050f218516df1d10bcc83803e1cf3f6e96efe (patch)
tree6112c03a5d8717a054bbf23c37e17a82ea0942ea /theme-compiler
parent83e6f7acf0df5ddd23063d9acb9bff158f98d0e0 (diff)
parent9df030ba55101db4a3a35c301769655d6fa7aa08 (diff)
downloadvaadin-framework-89f050f218516df1d10bcc83803e1cf3f6e96efe.tar.gz
vaadin-framework-89f050f218516df1d10bcc83803e1cf3f6e96efe.zip
Merge "fix Ticket #10506, remove quotes in url path"
Diffstat (limited to 'theme-compiler')
-rw-r--r--theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java4
-rw-r--r--theme-compiler/tests/resources/automatic/css/url-path.css5
-rw-r--r--theme-compiler/tests/resources/automatic/scss/foo/bar.scss5
-rw-r--r--theme-compiler/tests/resources/automatic/scss/url-path.scss1
4 files changed, 14 insertions, 1 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java b/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java
index 1ba1072767..67e6df6383 100644
--- a/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java
+++ b/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java
@@ -100,7 +100,9 @@ public class ImportNodeHandler {
LexicalUnit value = ((RuleNode) child).getValue();
while (value != null) {
if (value.getLexicalUnitType() == LexicalUnit.SAC_URI) {
- String path = value.getStringValue();
+ String path = value.getStringValue()
+ .replaceAll("^\"|\"$", "")
+ .replaceAll("^'|'$", "");
if (!path.startsWith("/") && !path.contains(":")) {
path = prefix + path;
path = StringUtil.cleanPath(path);
diff --git a/theme-compiler/tests/resources/automatic/css/url-path.css b/theme-compiler/tests/resources/automatic/css/url-path.css
new file mode 100644
index 0000000000..1045948ac8
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/css/url-path.css
@@ -0,0 +1,5 @@
+.bar {
+ background: url(foo/lorem.png);
+ background: url(foo/lorem.png);
+ background: url(foo/lorem.png);
+} \ No newline at end of file
diff --git a/theme-compiler/tests/resources/automatic/scss/foo/bar.scss b/theme-compiler/tests/resources/automatic/scss/foo/bar.scss
new file mode 100644
index 0000000000..326d34232d
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/scss/foo/bar.scss
@@ -0,0 +1,5 @@
+.bar {
+ background: url("lorem.png");
+ background: url('lorem.png');
+ background: url(lorem.png);
+} \ No newline at end of file
diff --git a/theme-compiler/tests/resources/automatic/scss/url-path.scss b/theme-compiler/tests/resources/automatic/scss/url-path.scss
new file mode 100644
index 0000000000..0cc954bfb4
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/scss/url-path.scss
@@ -0,0 +1 @@
+@import "foo/bar.scss"; \ No newline at end of file