Switch to nom's consumed.

This commit is contained in:
Tom Alexander
2022-12-18 06:42:02 -05:00
parent 89758721ed
commit f39319702c
2 changed files with 2 additions and 26 deletions

View File

@@ -1,4 +1,3 @@
use super::combinator::also_recognize;
use super::combinator::context_many_till;
use super::error::Res;
use super::parser_context::ChainBehavior;
@@ -12,6 +11,7 @@ use super::token::TextElement;
use super::token::Token;
use super::Context;
use nom::branch::alt;
use nom::combinator::consumed;
use nom::combinator::eof;
use nom::combinator::map;
use nom::combinator::not;
@@ -27,7 +27,7 @@ pub fn paragraph<'r, 's>(context: Context<'r, 's>, i: &'s str) -> Res<&'s str, P
exit_matcher: ChainBehavior::AndParent(Some(&context_paragraph_end)),
}))
.with_additional_node(ContextElement::StartOfParagraph);
let (remaining, (source, (many, till))) = also_recognize(context_many_till(
let (remaining, (source, (many, till))) = consumed(context_many_till(
&paragraph_context,
text_element,
context_paragraph_end,