mirror of
https://github.com/remy/inliner.git
synced 2024-09-11 17:25:30 +03:00
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:
parent
c439d79f5a
commit
cb894c8ce9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user