Create structure for org macros.

This commit is contained in:
Tom Alexander
2023-07-13 23:26:51 -04:00
parent c0371ff958
commit d24c26de7b
5 changed files with 60 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ use super::regular_link::regular_link;
use super::Context;
use crate::error::Res;
use crate::parser::angle_link::angle_link;
use crate::parser::org_macro::org_macro;
use crate::parser::object::Object;
use crate::parser::plain_link::plain_link;
use crate::parser::radio_link::radio_link;
@@ -35,6 +36,7 @@ pub fn standard_set_object<'r, 's>(
),
map(parser_with_context!(plain_link)(context), Object::PlainLink),
map(parser_with_context!(angle_link)(context), Object::AngleLink),
map(parser_with_context!(org_macro)(context), Object::OrgMacro),
map(parser_with_context!(plain_text)(context), Object::PlainText),
))(input)
}
@@ -72,6 +74,7 @@ pub fn any_object_except_plain_text<'r, 's>(
),
map(parser_with_context!(plain_link)(context), Object::PlainLink),
map(parser_with_context!(angle_link)(context), Object::AngleLink),
map(parser_with_context!(org_macro)(context), Object::OrgMacro),
))(input)
}