aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/frontmatter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/frontmatter.rs')
-rw-r--r--src/construct/frontmatter.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/construct/frontmatter.rs b/src/construct/frontmatter.rs
index 268d91d..f4774d6 100644
--- a/src/construct/frontmatter.rs
+++ b/src/construct/frontmatter.rs
@@ -281,13 +281,10 @@ pub fn content_end(tokenizer: &mut Tokenizer) -> State {
/// ^
/// ```
pub fn after(tokenizer: &mut Tokenizer) -> State {
- tokenizer.tokenize_state.marker = 0;
-
- match tokenizer.current {
- None | Some(b'\n') => {
- tokenizer.exit(Name::Frontmatter);
- State::Ok
- }
- _ => State::Nok,
- }
+ debug_assert!(
+ matches!(tokenizer.current, None | Some(b'\n')),
+ "expected eol/eof after closing fence"
+ );
+ tokenizer.exit(Name::Frontmatter);
+ State::Ok
}