Switch to nom's consumed.
This commit is contained in:
@@ -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(
|
||||
¶graph_context,
|
||||
text_element,
|
||||
context_paragraph_end,
|
||||
|
||||
Reference in New Issue
Block a user