simple-minify-html 0.17.2

Extremely fast and simple fork of minify-html
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::cfg::Cfg;

pub fn minify_comment(cfg: &Cfg, out: &mut Vec<u8>, code: &[u8], ended: bool) {
    let is_ssi = code.starts_with(b"#");
    if cfg.keep_comments || (is_ssi && cfg.keep_ssi_comments) {
        out.extend_from_slice(b"<!--");
        out.extend_from_slice(code);
        if ended {
            out.extend_from_slice(b"-->");
        };
    };
}