diff --git a/tasks/inline.js b/tasks/inline.js
index 5e08f6d..4138fc7 100644
--- a/tasks/inline.js
+++ b/tasks/inline.js
@@ -73,7 +73,7 @@ module.exports = function(grunt) {
filepath = filepath.replace(/[^\/]+\//, relativeTo);
}
- fileContent = fileContent.replace(//g, function(matchedWord, src){
+ fileContent = fileContent.replace(/]+?src=["']([^"']+?)["']\s*?\/>/g, function(matchedWord, src){
var ret = matchedWord;
if(isRemotePath(src) || !grunt.file.isPathAbsolute(src)){
@@ -93,7 +93,7 @@ module.exports = function(grunt) {
}
return _ret;
}
- ret = ret.replace(/(<\/script>)/g,_addMore);
+ ret = ret.replace(/(
+
diff --git a/test/expected/script_greedy.min.html b/test/expected/script_greedy.min.html
index 9a49bd9..d6f403d 100644
--- a/test/expected/script_greedy.min.html
+++ b/test/expected/script_greedy.min.html
@@ -1 +1 @@
-test
\ No newline at end of file
+test
\ No newline at end of file