minify-html/src/unit/bang.rs

13 lines
379 B
Rust
Raw Normal View History

use crate::err::ProcessingResult;
2020-01-25 02:04:02 -05:00
use crate::proc::MatchAction::*;
use crate::proc::MatchCond::*;
use crate::proc::MatchMode::*;
2020-01-25 02:07:52 -05:00
use crate::proc::Processor;
2019-12-25 04:44:51 -05:00
pub fn process_bang(proc: &mut Processor) -> ProcessingResult<()> {
2020-01-25 02:04:02 -05:00
proc.m(Is, Seq(b"<!"), Keep).expect();
proc.m(WhileNot, Char(b'>'), Keep);
proc.m(Is, Char(b'>'), Keep).require("Bang close")?;
2019-12-25 04:44:51 -05:00
Ok(())
}