inline-css
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -16,3 +16,3 @@ 'use strict'; | ||
var opts = options || {}, | ||
rules = parseCSS(css), | ||
rules, | ||
editedElements = [], | ||
@@ -28,2 +28,8 @@ $ = cheerio.load(html, pick(opts, [ | ||
try { | ||
rules = parseCSS(css); | ||
} catch (err) { | ||
throw new Error(err); | ||
} | ||
rules.forEach(function (rule) { | ||
@@ -30,0 +36,0 @@ var el, |
@@ -23,3 +23,9 @@ 'use strict'; | ||
extraCss = css + '\n' + options.extraCss; | ||
content = inlineCss(html, extraCss, options); | ||
try { | ||
content = inlineCss(html, extraCss, options); | ||
} catch (e) { | ||
return reject(e); | ||
} | ||
resolve(content); | ||
@@ -26,0 +32,0 @@ }); |
{ | ||
"name": "inline-css", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Inline css into an html file.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15810
309