diff options
Diffstat (limited to 'src/content/document.rs')
-rw-r--r-- | src/content/document.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/content/document.rs b/src/content/document.rs index 0c3cef7..32b32ba 100644 --- a/src/content/document.rs +++ b/src/content/document.rs @@ -251,12 +251,13 @@ fn container_new_before(tokenizer: &mut Tokenizer, info: DocumentInfo) -> State }); tokenizer.attempt(list_item, |ok| { - let func = if ok { - container_new_after - } else { - containers_after - }; - Box::new(move |t| func(t, info)) + Box::new(move |t| { + if ok { + container_new_after(t, info) + } else { + containers_after(t, info) + } + }) })(tokenizer) }) } |