The object parsers separated out.
This commit is contained in:
@@ -18,10 +18,7 @@ pub fn standard_set_object<'r, 's>(
|
||||
not(|i| context.check_exit_matcher(i))(input)?;
|
||||
|
||||
alt((
|
||||
map(
|
||||
parser_with_context!(text_markup)(context),
|
||||
Object::TextMarkup,
|
||||
),
|
||||
parser_with_context!(text_markup)(context),
|
||||
map(parser_with_context!(plain_text)(context), Object::PlainText),
|
||||
))(input)
|
||||
}
|
||||
@@ -35,10 +32,7 @@ pub fn minimal_set_object<'r, 's>(
|
||||
not(|i| context.check_exit_matcher(i))(input)?;
|
||||
|
||||
alt((
|
||||
map(
|
||||
parser_with_context!(text_markup)(context),
|
||||
Object::TextMarkup,
|
||||
),
|
||||
parser_with_context!(text_markup)(context),
|
||||
map(parser_with_context!(plain_text)(context), Object::PlainText),
|
||||
))(input)
|
||||
}
|
||||
@@ -49,8 +43,5 @@ pub fn any_object_except_plain_text<'r, 's>(
|
||||
input: &'s str,
|
||||
) -> Res<&'s str, Object<'s>> {
|
||||
// Used for exit matchers so this does not check exit matcher condition.
|
||||
alt((map(
|
||||
parser_with_context!(text_markup)(context),
|
||||
Object::TextMarkup,
|
||||
),))(input)
|
||||
alt((parser_with_context!(text_markup)(context),))(input)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user