Consume the trailing whitespace after a headline.

This commit is contained in:
Tom Alexander
2023-03-25 11:59:19 -04:00
parent b65c2f86b5
commit 3a0a4c8953
4 changed files with 31 additions and 11 deletions

View File

@@ -29,6 +29,7 @@ use super::parser_with_context::parser_with_context;
use super::source::Source;
use super::util::get_consumed;
use super::util::get_one_before;
use super::util::trailing_whitespace;
use super::Context;
#[derive(Debug)]
@@ -151,7 +152,7 @@ fn headline<'r, 's>(
many1_count(tag("*")),
space1,
many1(standard_set_object_matcher),
alt((line_ending, eof)),
trailing_whitespace,
))(input)?;
Ok((remaining, (star_count, ws, title, ws2)))
}