fixup! block: split parse_block function

This commit is contained in:
Noah Hellman 2023-02-01 21:57:32 +01:00
parent cadf49fc53
commit 59450ed9ad

View file

@ -401,8 +401,8 @@ impl<'s> TreeParser<'s> {
let row_node = self let row_node = self
.tree .tree
.enter(Node::Container(TableRow { head: false }), row.with_len(1)); .enter(Node::Container(TableRow { head: false }), row.with_len(1));
let rem = row.skip(1); let rem = row.skip(1); // |
let lex = lex::Lexer::new(row.skip(1).of(self.src).chars()); let lex = lex::Lexer::new(rem.of(self.src).chars());
let mut pos = rem.start(); let mut pos = rem.start();
let mut cell_start = pos; let mut cell_start = pos;
let mut separator_row = true; let mut separator_row = true;
@ -454,7 +454,7 @@ impl<'s> TreeParser<'s> {
pos += len; pos += len;
} }
if separator_row { if separator_row && verbatim.is_none() {
self.alignments.clear(); self.alignments.clear();
self.alignments.extend( self.alignments.extend(
self.tree self.tree
@ -500,10 +500,9 @@ impl<'s> TreeParser<'s> {
} }
} else { } else {
self.tree.exit(); // table row self.tree.exit(); // table row
}
last_row_node = Some(row_node); last_row_node = Some(row_node);
} }
}
self.tree.exit(); // table self.tree.exit(); // table
} }