Code structure for latex environment.

This commit is contained in:
Tom Alexander
2023-04-22 16:56:36 -04:00
parent 185f16d2cc
commit 4816a5dfc4
6 changed files with 58 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ use super::footnote_definition::footnote_definition;
use super::greater_block::greater_block;
use super::horizontal_rule::horizontal_rule;
use super::keyword::keyword;
use super::latex_environment::latex_environment;
use super::lesser_block::comment_block;
use super::lesser_block::example_block;
use super::lesser_block::export_block;
@@ -51,6 +52,8 @@ pub fn element(
let horizontal_rule_matcher = parser_with_context!(horizontal_rule)(context);
let keyword_matcher = parser_with_context!(keyword)(context);
let paragraph_matcher = parser_with_context!(paragraph)(context);
let latex_environment_matcher = parser_with_context!(latex_environment)(context);
let (remaining, mut affiliated_keywords) = many0(keyword_matcher)(input)?;
let (remaining, mut element) = match alt((
map(plain_list_matcher, Element::PlainList),
@@ -69,6 +72,7 @@ pub fn element(
map(diary_sexp_matcher, Element::DiarySexp),
map(fixed_width_area_matcher, Element::FixedWidthArea),
map(horizontal_rule_matcher, Element::HorizontalRule),
map(latex_environment_matcher, Element::LatexEnvironment),
))(remaining)
{
the_ok @ Ok(_) => the_ok,