Changes necessary for latest cargo packages
This commit is contained in:
@@ -140,29 +140,6 @@ impl Transformer for StripHtml {
|
||||
}
|
||||
}
|
||||
|
||||
struct InlineRemoteStyle<'a> {
|
||||
base_url: &'a Option<Url>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl<'a> Transformer for InlineRemoteStyle<'a> {
|
||||
async fn transform(&self, _: &Option<Url>, html: &str) -> Result<String, TransformError> {
|
||||
//info!("HTML:\n{html}");
|
||||
Ok(
|
||||
match CSSInliner::options()
|
||||
.base_url(self.base_url.clone())
|
||||
.build()
|
||||
.inline(&html)
|
||||
{
|
||||
Ok(inlined_html) => inlined_html,
|
||||
Err(err) => {
|
||||
error!("failed to inline remote CSS: {err}");
|
||||
html.to_string()
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
struct InlineStyle;
|
||||
|
||||
#[async_trait]
|
||||
|
||||
Reference in New Issue
Block a user