minify-html/rust/main/src/minify/instruction.rs

12 lines
307 B
Rust
Raw Normal View History

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