broccoli-sri-hash
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,5 @@ | ||
# 1.0.3 | ||
- Fixing extra closing slash and whitespace in output | ||
- Update to latest broccoli-filter | ||
# 1.0.2 | ||
@@ -2,0 +6,0 @@ - Changing packages to be semver compatible |
@@ -79,4 +79,6 @@ var Filter = require('broccoli-filter'); | ||
var assetSource = this.readFile(dirname, file); | ||
var selfCloseCheck = /\s*\/>$/; | ||
var integrity; | ||
var append; | ||
var outputWithIntegrity; | ||
@@ -99,3 +101,8 @@ if (assetSource === null) { | ||
return output.replace(/\/?[>]$/, append + '/>'); | ||
if (selfCloseCheck.test(output)) { | ||
outputWithIntegrity = output.replace(selfCloseCheck, append + ' />'); | ||
} else { | ||
outputWithIntegrity = output.replace(/\s*[>]$/, append + ' >'); | ||
} | ||
return outputWithIntegrity; | ||
}; | ||
@@ -102,0 +109,0 @@ |
{ | ||
"name": "broccoli-sri-hash", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Generates SRI hashes for html files", | ||
@@ -22,2 +22,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"broccoli-filter": "^1.1.0", | ||
"chai": "^3.0.0", | ||
@@ -24,0 +25,0 @@ "eslint-config-nightmare-mode": "0.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
161
14991
4
19