includejs
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"bin": { | ||
@@ -12,0 +12,0 @@ "includejs": "includejs", |
@@ -18,3 +18,3 @@ include.js({ | ||
if (file.copyImagesTo == null){ | ||
console.error('Error: No copyImagesTo', resource.uri.toLocalFile()); | ||
console.error('Error: Not implemented copyImagesTo', resource.uri.toLocalFile()); | ||
} | ||
@@ -21,0 +21,0 @@ |
@@ -6,16 +6,20 @@ include.exports = { | ||
imgbin = [], | ||
match = regexp.exec(content); | ||
match = regexp.exec(content), | ||
href; | ||
while (match) { | ||
if (!match[2]) { | ||
while (match && match.length > 1 && match[2]) { | ||
href = match[2].trim(); | ||
if (!href) { | ||
console.error('NOT MATCHED', match); | ||
} | ||
console.log('CSS match', match[2]); | ||
console.log('CSS match', href); | ||
var imguri = new net.URI(match[2]); | ||
var imguri = new net.URI(href), | ||
base = href[0] === '/' ? baseuri : uri; | ||
imgbin.push({ | ||
mimeType: 'image/png', | ||
href: match[2], | ||
uri: imguri.isRelative() ? uri.combine(imguri) : imguri, | ||
href: href, | ||
uri: imguri.isRelative() ? base.combine(imguri) : imguri, | ||
baseuri: uri | ||
@@ -22,0 +26,0 @@ }); |
801831
12684