fix: ignore fragment identifiers on urls

Since the cache is keyyed by URL, it makes sense to ignore the hash fragment identifier.
This commit is contained in:
Remy Sharp 2015-07-30 23:53:50 +01:00
parent c439d79f5a
commit cb894c8ce9

View File

@ -3,6 +3,7 @@ module.exports = image;
var debug = require('debug')('inliner');
function image(url) {
url = url.replace(/#.*$/, '');
this.emit('progress', 'get image ' + url);
return this.get(url, { encoding: 'binary' }).then(function then(res) {
if (url.indexOf('data:') === 0) {