diff options
Diffstat (limited to 'src/construct/autolink.rs')
-rw-r--r-- | src/construct/autolink.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/construct/autolink.rs b/src/construct/autolink.rs index 1bb8004..5c826a3 100644 --- a/src/construct/autolink.rs +++ b/src/construct/autolink.rs @@ -115,16 +115,15 @@ use crate::tokenizer::Tokenizer; /// ^ /// ``` pub fn start(tokenizer: &mut Tokenizer) -> State { - match tokenizer.current { - Some(b'<') if tokenizer.parse_state.constructs.autolink => { - tokenizer.enter(Name::Autolink); - tokenizer.enter(Name::AutolinkMarker); - tokenizer.consume(); - tokenizer.exit(Name::AutolinkMarker); - tokenizer.enter(Name::AutolinkProtocol); - State::Next(StateName::AutolinkOpen) - } - _ => State::Nok, + if tokenizer.parse_state.constructs.autolink && tokenizer.current == Some(b'<') { + tokenizer.enter(Name::Autolink); + tokenizer.enter(Name::AutolinkMarker); + tokenizer.consume(); + tokenizer.exit(Name::AutolinkMarker); + tokenizer.enter(Name::AutolinkProtocol); + State::Next(StateName::AutolinkOpen) + } else { + State::Nok } } |