minify-html/src/minify/instruction.rs

17 lines
333 B
Rust
Raw Normal View History

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