mirror of
https://github.com/remy/inliner.git
synced 2024-09-11 17:25:30 +03:00
fix: relative urls
This commit is contained in:
parent
8dfea139c8
commit
96d7bf2fe3
@ -4,8 +4,8 @@ var cheerio = require('cheerio');
|
||||
var debug = require('debug')('inliner');
|
||||
|
||||
function findAssets(html) {
|
||||
debug('loading DOM');
|
||||
var $ = cheerio.load(html);
|
||||
debug('loaded DOM');
|
||||
|
||||
|
||||
var images = $('img');
|
||||
|
@ -101,6 +101,8 @@ function main() {
|
||||
url = 'http://' + url;
|
||||
}
|
||||
|
||||
inliner.url = url;
|
||||
|
||||
debug('loading url: %s', url);
|
||||
|
||||
return get(url);
|
||||
@ -174,7 +176,7 @@ function main() {
|
||||
|
||||
return Promise.all(promises).then(function then() {
|
||||
var html = '';
|
||||
var els = inliner.removeComments($(':root')[0], $);
|
||||
inliner.removeComments($(':root')[0], $);
|
||||
// collapse the white space
|
||||
if (inliner.options.collapseWhitespace) {
|
||||
// TODO put white space helper back in
|
||||
|
Loading…
Reference in New Issue
Block a user