diff --git a/src/parser/headline.rs b/src/parser/headline.rs index a6e43b3..d859b7b 100644 --- a/src/parser/headline.rs +++ b/src/parser/headline.rs @@ -1,10 +1,7 @@ use nom::branch::alt; use nom::bytes::complete::tag; use nom::character::complete::anychar; -use nom::character::complete::line_ending; -use nom::character::complete::space0; use nom::character::complete::space1; -use nom::combinator::eof; use nom::combinator::map; use nom::combinator::not; use nom::combinator::opt; @@ -184,8 +181,9 @@ fn headline_title_end<'b, 'g, 'r, 's>( input: OrgSource<'s>, ) -> Res, OrgSource<'s>> { recognize(tuple(( - opt(tuple((space0, tags, space0))), - alt((line_ending, eof)), + org_spaces0, + opt(tuple((tags, org_spaces0))), + org_line_ending, )))(input) }