diff --git a/src/export/output.rs b/src/export/output.rs index 1090553..febfa2f 100644 --- a/src/export/output.rs +++ b/src/export/output.rs @@ -240,26 +240,37 @@ let originalHeight = {height}; ) } }; - let html = format!( - r#" - + let style = match self.output_format { + OutputFormat::Pdf => String::new(), + OutputFormat::Html => format!( + " + " + ), + }; + let html = format!( + r" + +{style} {html_body} {html_script} -"# +" ); let html_path = self.content_manager.persist_file("index.html", html.as_bytes())?; + let css_path = self.content_manager.persist_file("styles.css", css.as_bytes())?; match self.output_format { OutputFormat::Pdf => { ThirdPartyTools::weasyprint(&[ + "-s", + css_path.to_string_lossy().as_ref(), "--presentational-hints", "-e", "utf8",