From f368e57d7fd82425b9821a9910bbcae1486062c9 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 9 Apr 2023 16:52:07 +0200 Subject: [PATCH] don't always minify when rendering html --- src/template.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/template.rs b/src/template.rs index 9b7c608..97ca75b 100644 --- a/src/template.rs +++ b/src/template.rs @@ -1,14 +1,5 @@ use askama::DynTemplate; -use minify_html::{minify, Cfg}; pub fn render_html(template: &dyn DynTemplate) -> String { - let data = template.dyn_render().unwrap(); - - // we just minify before sending to the client, - // we need to find a way to pre-minify static pages to the dist folder, - // maybe in release mode? to make debugging easier - // from https://git.mylloon.fr/Anri/mylloon.fr/issues/15 - - let cfg = Cfg::spec_compliant(); - String::from_utf8(minify(data.as_bytes(), &cfg)).unwrap() + template.dyn_render().unwrap() }