Compare target properties.
This commit is contained in:
@@ -4,12 +4,10 @@ use nom::character::complete::one_of;
|
||||
use nom::combinator::peek;
|
||||
use nom::combinator::recognize;
|
||||
use nom::combinator::verify;
|
||||
use nom::multi::many_till;
|
||||
|
||||
use super::org_source::OrgSource;
|
||||
use super::util::exit_matcher_parser;
|
||||
use super::util::maybe_consume_object_trailing_whitespace_if_not_exiting;
|
||||
use crate::context::parser_with_context;
|
||||
use super::util::text_until_exit;
|
||||
use crate::context::ContextElement;
|
||||
use crate::context::ExitClass;
|
||||
use crate::context::ExitMatcherNode;
|
||||
@@ -38,10 +36,7 @@ pub(crate) fn target<'b, 'g, 'r, 's>(
|
||||
exit_matcher: &target_end,
|
||||
});
|
||||
let parser_context = context.with_additional_node(&parser_context);
|
||||
let (remaining, _body) = recognize(many_till(
|
||||
anychar,
|
||||
parser_with_context!(exit_matcher_parser)(&parser_context),
|
||||
))(remaining)?;
|
||||
let (remaining, body) = text_until_exit(&parser_context, remaining)?;
|
||||
|
||||
let preceding_character = remaining
|
||||
.get_preceding_character()
|
||||
@@ -60,6 +55,7 @@ pub(crate) fn target<'b, 'g, 'r, 's>(
|
||||
remaining,
|
||||
Target {
|
||||
source: source.into(),
|
||||
value: body.into(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user