html: fix missing <p> tags after ordered lists

resolves #44
This commit is contained in:
Noah Hellman 2023-08-05 13:09:00 +02:00
parent 0586bf6a44
commit 6091f2ea70
2 changed files with 17 additions and 9 deletions

View file

@ -295,17 +295,13 @@ impl<'s> Writer<'s> {
}
match c {
Container::Blockquote => out.write_str("</blockquote>")?,
Container::List {
kind: ListKind::Unordered | ListKind::Task,
..
} => {
Container::List { kind, .. } => {
self.list_tightness.pop();
out.write_str("</ul>")?;
match kind {
ListKind::Unordered | ListKind::Task => out.write_str("</ul>")?,
ListKind::Ordered { .. } => out.write_str("</ol>")?,
}
}
Container::List {
kind: ListKind::Ordered { .. },
..
} => out.write_str("</ol>")?,
Container::ListItem | Container::TaskListItem { .. } => {
out.write_str("</li>")?;
}

View file

@ -0,0 +1,12 @@
```
1. item
para
.
<ol>
<li>
item
</li>
</ol>
<p>para</p>
```