fixup! block: fix headings with first line empty

This commit is contained in:
Noah Hellman 2023-01-30 17:24:01 +01:00
parent 08332bed5e
commit 2893977dae

View file

@ -301,7 +301,7 @@ impl<'s> TreeParser<'s> {
self.tree.enter(Node::Leaf(leaf), span);
lines
.iter()
.filter(|l| !l.is_empty())
.filter(|l| !matches!(k, Kind::Heading { .. }) || !l.is_empty())
.for_each(|line| self.tree.inline(*line));
self.tree.exit();
}