Move the post-colon check into the item_tag_divider parser.
This commit is contained in:
@@ -359,22 +359,22 @@ fn item_tag_end<'b, 'g, 'r, 's>(
|
||||
_context: RefContext<'b, 'g, 'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
alt((
|
||||
recognize(tuple((
|
||||
item_tag_divider,
|
||||
alt((item_tag_divider, line_ending))(input)
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
fn item_tag_divider<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
recognize(tuple((
|
||||
one_of(" \t"),
|
||||
tag("::"),
|
||||
peek(tuple((
|
||||
opt(tuple((
|
||||
peek(one_of(" \t")),
|
||||
many_till(anychar, peek(alt((item_tag_divider, line_ending, eof)))),
|
||||
))),
|
||||
alt((line_ending, eof)),
|
||||
))),
|
||||
line_ending,
|
||||
))(input)
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
fn item_tag_divider<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
recognize(tuple((one_of(" \t"), tag("::"))))(input)
|
||||
)))(input)
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
|
||||
Reference in New Issue
Block a user