We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf6ecaa commit 49b26bbCopy full SHA for 49b26bb
src/lib.rs
@@ -294,17 +294,18 @@ impl<'a> CSSInliner<'a> {
294
.borrow()
295
.get("href")
296
.as_ref()
297
- .unwrap()
+ .unwrap_or_else(|| &"")
298
.to_string()
299
-
300
})
301
.collect::<Vec<String>>();
302
links.sort();
303
links.dedup();
304
for href in &links {
305
- let url = self.get_full_url(href);
306
- let css = self.load_external(url.as_ref())?;
307
- process_css(&document, css.as_str())?;
+ if !href.is_empty() {
+ let url = self.get_full_url(href);
+ let css = self.load_external(url.as_ref())?;
+ process_css(&document, css.as_str())?;
308
+ }
309
}
310
311
if let Some(extra_css) = &self.options.extra_css {
0 commit comments