Skip to content

Commit

Permalink
Fixed style elements with direct descendant selectors being stripped,…
Browse files Browse the repository at this point in the history
… ie. body > * { foo: bar} was being converted to: body*{foo:bar} - missing '>'.
  • Loading branch information
remy committed Jun 11, 2011
1 parent 78204a7 commit 68a0bc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions inliner.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function Inliner(url, options, callback) {
} else {
html = window.document.innerHTML;
}
// console.log(html);

html = '<!DOCTYPE html>' + html;
callback && callback(html);
inliner.emit('end', html);
Expand All @@ -146,11 +146,10 @@ function Inliner(url, options, callback) {
inliner.getImportCSS(root, this.innerHTML, function (css, url) {
inliner.getImagesFromCSS(url, css, function (css) {
if (inliner.options.compressCSS) inliner.emit('progress', 'compress inline css');
style.innerHTML = css;
window.$(style).text(css);

breakdown.styles--;
inliner.todo--;
// console.log('style finished');
finished();
});
});
Expand All @@ -177,7 +176,6 @@ function Inliner(url, options, callback) {
}

window.$(link).replaceWith(style);
// console.log('link finished');
finished();
});
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inliner",
"version": "0.1.6",
"version": "0.1.7",
"description": "Utility to inline images, CSS and JavaScript for a web page - useful for mobile sites",
"homepage": "http://github.com/remy/inliner",
"main": "inliner",
Expand Down

0 comments on commit 68a0bc8

Please sign in to comment.