Accept the end condition as a parameter to the plain text parser so it can adapt to the context.
This commit is contained in:
@@ -6,7 +6,7 @@ use nom::character::complete::one_of;
|
||||
use nom::combinator::verify;
|
||||
use nom::multi::many_till;
|
||||
|
||||
use super::object_parser::regular_link_description_object_set;
|
||||
use super::object_parser::regular_link_description_set_object;
|
||||
use super::org_source::OrgSource;
|
||||
use super::util::exit_matcher_parser;
|
||||
use super::util::get_consumed;
|
||||
@@ -99,7 +99,7 @@ pub fn description<'b, 'g, 'r, 's>(
|
||||
let parser_context = context.with_additional_node(&parser_context);
|
||||
let (remaining, (children, _exit_contents)) = verify(
|
||||
many_till(
|
||||
parser_with_context!(regular_link_description_object_set)(&parser_context),
|
||||
parser_with_context!(regular_link_description_set_object)(&parser_context),
|
||||
parser_with_context!(exit_matcher_parser)(&parser_context),
|
||||
),
|
||||
|(children, _exit_contents)| !children.is_empty(),
|
||||
|
||||
Reference in New Issue
Block a user