minify-html/src/unit/bang.rs

13 lines
316 B
Rust
Raw Normal View History

2019-12-25 04:44:51 -05:00
use crate::proc::Processor;
2019-12-25 07:29:18 -05:00
use crate::err::InternalResult;
2019-12-25 04:44:51 -05:00
2019-12-25 07:29:18 -05:00
pub fn process_bang<'d, 'p>(proc: &'p mut Processor<'d>) -> InternalResult<()> {
chain!(proc.match_seq(b"<!").require()?.keep());
2019-12-25 04:44:51 -05:00
2019-12-25 07:29:18 -05:00
chain!(proc.match_while_not_char(b'>').keep());
2019-12-25 04:44:51 -05:00
2019-12-25 07:29:18 -05:00
chain!(proc.match_char(b'>').require()?.keep());
2019-12-25 04:44:51 -05:00
Ok(())
}