|
|
@ -154,16 +154,17 @@ impl ToHtml for Document {
|
|
|
|
writer.write(style)?;
|
|
|
|
writer.write(style)?;
|
|
|
|
writer.write("</style>".to_string())?;
|
|
|
|
writer.write("</style>".to_string())?;
|
|
|
|
|
|
|
|
|
|
|
|
for stylesheet in &self.stylesheets {
|
|
|
|
|
|
|
|
let mut stylesheet = stylesheet.lock();
|
|
|
|
|
|
|
|
let data = std::mem::replace(&mut stylesheet.data, None);
|
|
|
|
|
|
|
|
if let Some(data) = data {
|
|
|
|
|
|
|
|
if self.config.lock().features.include_mathjax {
|
|
|
|
if self.config.lock().features.include_mathjax {
|
|
|
|
writer.write(format!(
|
|
|
|
writer.write(format!(
|
|
|
|
"<script id=\"MathJax-script\" type=\"text/javascript\" async src={}></script>",
|
|
|
|
"<script id=\"MathJax-script\" type=\"text/javascript\" async src={}></script>",
|
|
|
|
MATHJAX_URL
|
|
|
|
MATHJAX_URL
|
|
|
|
))?;
|
|
|
|
))?;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for stylesheet in &self.stylesheets {
|
|
|
|
|
|
|
|
let mut stylesheet = stylesheet.lock();
|
|
|
|
|
|
|
|
let data = std::mem::replace(&mut stylesheet.data, None);
|
|
|
|
|
|
|
|
if let Some(data) = data {
|
|
|
|
writer.write("<style>".to_string())?;
|
|
|
|
writer.write("<style>".to_string())?;
|
|
|
|
writer.write(minify(String::from_utf8(data).unwrap().as_str()))?;
|
|
|
|
writer.write(minify(String::from_utf8(data).unwrap().as_str()))?;
|
|
|
|
writer.write("</style>".to_string())?;
|
|
|
|
writer.write("</style>".to_string())?;
|
|
|
|