Add check for name on paragraph.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use nom::branch::alt;
|
||||
use nom::combinator::map;
|
||||
use nom::combinator::not;
|
||||
use nom::multi::many0;
|
||||
use nom::sequence::tuple;
|
||||
|
||||
use super::clock::clock;
|
||||
use super::comment::comment;
|
||||
@@ -98,7 +100,13 @@ fn _element<'b, 'g, 'r, 's>(
|
||||
map(horizontal_rule_matcher, Element::HorizontalRule),
|
||||
map(latex_environment_matcher, Element::LatexEnvironment),
|
||||
map(babel_keyword_matcher, Element::BabelCall),
|
||||
map(keyword_matcher, Element::Keyword),
|
||||
map(
|
||||
map(
|
||||
tuple((not(affiliated_keyword_matcher), keyword_matcher)),
|
||||
|(_, kw)| kw,
|
||||
),
|
||||
Element::Keyword,
|
||||
),
|
||||
))(remaining)
|
||||
{
|
||||
the_ok @ Ok(_) => the_ok,
|
||||
|
||||
@@ -47,6 +47,7 @@ pub(crate) fn paragraph<'b, 'g, 'r, 's>(
|
||||
remaining,
|
||||
Paragraph {
|
||||
source: source.into(),
|
||||
name: None, // TODO
|
||||
children,
|
||||
},
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user