From a7a4d19fe3bc9e5e0c3218d9af41d9cee80e9374 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 15 Jul 2022 10:45:41 +0200 Subject: Fix lazy first line in code (fenced) --- src/construct/code_fenced.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/construct') diff --git a/src/construct/code_fenced.rs b/src/construct/code_fenced.rs index 18beb92..cf3336b 100644 --- a/src/construct/code_fenced.rs +++ b/src/construct/code_fenced.rs @@ -377,19 +377,13 @@ fn meta(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { /// ~~~ /// ``` fn at_break(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { - let clone = info.clone(); - - if tokenizer.lazy { - after(tokenizer, code, info) - } else { - tokenizer.check(partial_non_lazy_continuation, |ok| { - if ok { - Box::new(move |t, c| at_non_lazy_break(t, c, clone)) - } else { - Box::new(move |t, c| after(t, c, clone)) - } - })(tokenizer, code) - } + tokenizer.check(partial_non_lazy_continuation, |ok| { + if ok { + Box::new(move |t, c| at_non_lazy_break(t, c, info)) + } else { + Box::new(move |t, c| after(t, c, info)) + } + })(tokenizer, code) } /// To do. -- cgit