diff --git a/src/parsers.rs b/src/parsers.rs index a3e737e..57bcc5b 100644 --- a/src/parsers.rs +++ b/src/parsers.rs @@ -713,6 +713,8 @@ pub fn parse_org_table<'a, T: ElementArena<'a>>( let mut has_header = false; + // TODO: merge contiguous rules + if let Some(line) = iter.next() { let line = line.trim_start(); if !line.starts_with("|-") { diff --git a/src/validate.rs b/src/validate.rs index 1130655..09f4738 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -131,7 +131,6 @@ impl Org<'_> { } } Element::TableRow(TableRow::Header) => { - expect_children!(node_id); for child in node_id.children(&self.arena) { expect_element!( child, @@ -141,7 +140,6 @@ impl Org<'_> { } } Element::TableRow(TableRow::Body) => { - expect_children!(node_id); for child in node_id.children(&self.arena) { expect_element!( child, diff --git a/tests/parse.rs b/tests/parse.rs index 974949e..69fb98c 100644 --- a/tests/parse.rs +++ b/tests/parse.rs @@ -154,3 +154,19 @@ test_suite!( "#, "
" ); + +test_suite!( + table6, + r#" +| +|- +| +|- +| +"#, + "
\ + \ + \ + \ +
" +);