From 6562c4b04ea8a1a038b360fea868daa3ce31d9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=84=E5=AF=82?= Date: Mon, 1 Jun 2015 17:37:30 +0800 Subject: [PATCH] fix: fixCSSpathPlugin bug which is mentioned in spmjs/spm#1320, Close spmjs/spm#1320 --- lib/FixCSSPathPlugin.js | 2 +- .../hello/0.0.1/a/a.css | 6 +++--- .../expected/fix-css-resources-path-with-name/hello/a/a.css | 6 +++--- .../fix-css-resources-path-with-version/0.0.1/a/a.css | 6 +++--- test/expected/fix-css-resources-path/a/a.css | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/FixCSSPathPlugin.js b/lib/FixCSSPathPlugin.js index 7a304cc..fdf43c2 100644 --- a/lib/FixCSSPathPlugin.js +++ b/lib/FixCSSPathPlugin.js @@ -68,7 +68,7 @@ function fixCSS(pkgOpts, assets) { if (item.path === newPath) { return item.string; } else { - return 'url("'+newPath+'");'; + return 'url("'+newPath+'")'; } }); assets[cssFile] = new RawSource(code); diff --git a/test/expected/fix-css-resources-path-with-name-and-version/hello/0.0.1/a/a.css b/test/expected/fix-css-resources-path-with-name-and-version/hello/0.0.1/a/a.css index f3c5fd2..70e5d08 100644 --- a/test/expected/fix-css-resources-path-with-name-and-version/hello/0.0.1/a/a.css +++ b/test/expected/fix-css-resources-path-with-name-and-version/hello/0.0.1/a/a.css @@ -1,13 +1,13 @@ a { color: red; - background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg");; + background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg"); } a { color: red; - background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg");; + background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg"); } a { - background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc");; + background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc"); } \ No newline at end of file diff --git a/test/expected/fix-css-resources-path-with-name/hello/a/a.css b/test/expected/fix-css-resources-path-with-name/hello/a/a.css index f3c5fd2..70e5d08 100644 --- a/test/expected/fix-css-resources-path-with-name/hello/a/a.css +++ b/test/expected/fix-css-resources-path-with-name/hello/a/a.css @@ -1,13 +1,13 @@ a { color: red; - background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg");; + background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg"); } a { color: red; - background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg");; + background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg"); } a { - background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc");; + background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc"); } \ No newline at end of file diff --git a/test/expected/fix-css-resources-path-with-version/0.0.1/a/a.css b/test/expected/fix-css-resources-path-with-version/0.0.1/a/a.css index f3c5fd2..70e5d08 100644 --- a/test/expected/fix-css-resources-path-with-version/0.0.1/a/a.css +++ b/test/expected/fix-css-resources-path-with-version/0.0.1/a/a.css @@ -1,13 +1,13 @@ a { color: red; - background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg");; + background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg"); } a { color: red; - background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg");; + background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg"); } a { - background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc");; + background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc"); } \ No newline at end of file diff --git a/test/expected/fix-css-resources-path/a/a.css b/test/expected/fix-css-resources-path/a/a.css index f3c5fd2..70e5d08 100644 --- a/test/expected/fix-css-resources-path/a/a.css +++ b/test/expected/fix-css-resources-path/a/a.css @@ -1,13 +1,13 @@ a { color: red; - background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg");; + background: url("../a999bdfa2088b4e95c213a07b79cc353.jpg"); } a { color: red; - background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg");; + background: url("../917cf8a0ae274ed25f07ad296acb10c8.jpg"); } a { - background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc");; + background: url("../173ad31e7143beba48c678b38c686cfa.jpg#abc"); } \ No newline at end of file