minify-html/src/minify/comment.rs

12 lines
298 B
Rust
Raw Normal View History

2021-08-06 02:17:45 -04:00
use crate::cfg::Cfg;
2021-08-06 02:19:36 -04:00
pub fn minify_comment(cfg: &Cfg, out: &mut Vec<u8>, code: &[u8], ended: bool) -> () {
2021-08-06 02:17:45 -04:00
if !cfg.remove_comments {
out.extend_from_slice(b"<!--");
out.extend_from_slice(&code);
if ended {
out.extend_from_slice(b"-->");
};
};
}