From 95b437b3acd6f0c00bbc66be9c87d2636466ef7c Mon Sep 17 00:00:00 2001 From: jutty Date: Wed, 24 Dec 2025 06:33:40 -0300 Subject: [PATCH] Expect a newline after PreFormat lexemes --- src/syntax/content/parser/token/preformat.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/syntax/content/parser/token/preformat.rs b/src/syntax/content/parser/token/preformat.rs index 568bd38..195636d 100644 --- a/src/syntax/content/parser/token/preformat.rs +++ b/src/syntax/content/parser/token/preformat.rs @@ -15,13 +15,7 @@ impl PreFormat { impl Parseable for PreFormat { fn probe(lexeme: &Lexeme) -> bool { - let chars = lexeme.split_chars(); - - if let Some(first_char) = chars.first() { - *first_char == '`' - } else { - false - } + lexeme.match_first_char('`') && lexeme.next == "\n" } fn lex(_lexeme: &Lexeme) -> PreFormat {