Handle headlines with trailing spaces without tags.
This commit is contained in:
parent
32b19d68d0
commit
87941271a4
@ -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>, OrgSource<'s>> {
|
||||
recognize(tuple((
|
||||
opt(tuple((space0, tags, space0))),
|
||||
alt((line_ending, eof)),
|
||||
org_spaces0,
|
||||
opt(tuple((tags, org_spaces0))),
|
||||
org_line_ending,
|
||||
)))(input)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user