Add a detect object function similar to the detect element function.
This commit is contained in:
@@ -7,7 +7,7 @@ use nom::combinator::recognize;
|
||||
use nom::combinator::verify;
|
||||
use nom::multi::many_till;
|
||||
|
||||
use super::object_parser::any_object_except_plain_text;
|
||||
use super::object_parser::detect_any_object_except_plain_text;
|
||||
use super::org_source::OrgSource;
|
||||
use super::radio_link::RematchObject;
|
||||
use super::util::exit_matcher_parser;
|
||||
@@ -46,7 +46,9 @@ fn plain_text_end<'b, 'g, 'r, 's>(
|
||||
context: RefContext<'b, 'g, 'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
recognize(parser_with_context!(any_object_except_plain_text)(context))(input)
|
||||
recognize(parser_with_context!(detect_any_object_except_plain_text)(
|
||||
context,
|
||||
))(input)
|
||||
}
|
||||
|
||||
impl<'x> RematchObject<'x> for PlainText<'x> {
|
||||
|
||||
Reference in New Issue
Block a user