Add comments about the sets of objects that can exist.
This commit is contained in:
@@ -18,6 +18,7 @@ use crate::parser::exiting::ExitClass;
|
||||
use crate::parser::greater_element::TableRow;
|
||||
use crate::parser::lesser_element::TableCell;
|
||||
use crate::parser::object::minimal_set_object;
|
||||
use crate::parser::object::Object;
|
||||
use crate::parser::parser_context::ContextElement;
|
||||
use crate::parser::parser_context::ExitMatcherNode;
|
||||
use crate::parser::parser_with_context::parser_with_context;
|
||||
@@ -115,10 +116,11 @@ pub fn org_mode_table_cell<'r, 's>(
|
||||
class: ExitClass::Beta,
|
||||
exit_matcher: &org_mode_table_cell_end,
|
||||
}));
|
||||
let minimal_set_object_matcher = parser_with_context!(minimal_set_object)(&parser_context);
|
||||
let table_cell_set_object_matcher =
|
||||
parser_with_context!(table_cell_set_object)(&parser_context);
|
||||
let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context);
|
||||
let (remaining, (children, _exit_contents)) = verify(
|
||||
many_till(minimal_set_object_matcher, exit_matcher),
|
||||
many_till(table_cell_set_object_matcher, exit_matcher),
|
||||
|(children, exit_contents)| !children.is_empty() || exit_contents.ends_with("|"),
|
||||
)(input)?;
|
||||
|
||||
@@ -136,3 +138,14 @@ fn org_mode_table_cell_end<'r, 's>(
|
||||
) -> Res<&'s str, &'s str> {
|
||||
recognize(tuple((space0, alt((tag("|"), peek(line_ending))))))(input)
|
||||
}
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
pub fn table_cell_set_object<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: &'s str,
|
||||
) -> Res<&'s str, Object<'s>> {
|
||||
not(|i| context.check_exit_matcher(i))(input)?;
|
||||
|
||||
parser_with_context!(minimal_set_object)(context)(input)
|
||||
// TODO: add citations, export snippets, footnote references, links, macros, radio targets, targets, and timestamps.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user