Compare footnote section.
This commit is contained in:
@@ -4,6 +4,7 @@ use nom::bytes::complete::tag;
|
||||
use nom::character::complete::anychar;
|
||||
use nom::character::complete::space0;
|
||||
use nom::character::complete::space1;
|
||||
use nom::combinator::consumed;
|
||||
use nom::combinator::map;
|
||||
use nom::combinator::not;
|
||||
use nom::combinator::opt;
|
||||
@@ -101,6 +102,7 @@ fn _heading<'b, 'g, 'r, 's>(
|
||||
children,
|
||||
is_comment: maybe_comment.is_some(),
|
||||
is_archived,
|
||||
is_footnote_section: false, // TODO
|
||||
},
|
||||
))
|
||||
}
|
||||
@@ -159,7 +161,9 @@ fn headline<'b, 'g, 'r, 's>(
|
||||
|
||||
let (remaining, maybe_title) = opt(tuple((
|
||||
space1,
|
||||
many1(parser_with_context!(standard_set_object)(&parser_context)),
|
||||
consumed(many1(parser_with_context!(standard_set_object)(
|
||||
&parser_context,
|
||||
))),
|
||||
)))(remaining)?;
|
||||
|
||||
let (remaining, maybe_tags) = opt(tuple((space0, tags)))(remaining)?;
|
||||
@@ -174,7 +178,9 @@ fn headline<'b, 'g, 'r, 's>(
|
||||
maybe_todo_keyword.map(|(_, todo, _)| todo),
|
||||
maybe_priority,
|
||||
maybe_comment.map(|(_, comment, _)| comment),
|
||||
maybe_title.map(|(_, title)| title).unwrap_or(Vec::new()),
|
||||
maybe_title
|
||||
.map(|(_, (_, title))| title)
|
||||
.unwrap_or(Vec::new()),
|
||||
maybe_tags
|
||||
.map(|(_ws, tags)| {
|
||||
tags.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user