diff --git a/src/markdown.rs b/src/markdown.rs index 00d85e4..0adafc3 100644 --- a/src/markdown.rs +++ b/src/markdown.rs @@ -241,14 +241,11 @@ pub fn compile_markdown( _ => {} } - match state { - State::Metadata(false) => { - state = State::Start; - } - _ => { - state = State::Paragraph; - } - } + state = if state == State::Metadata(false) { + State::Start + } else { + State::Paragraph + }; } Text(text) => {