parent
0586bf6a44
commit
6091f2ea70
2 changed files with 17 additions and 9 deletions
14
src/html.rs
14
src/html.rs
|
@ -295,17 +295,13 @@ impl<'s> Writer<'s> {
|
||||||
}
|
}
|
||||||
match c {
|
match c {
|
||||||
Container::Blockquote => out.write_str("</blockquote>")?,
|
Container::Blockquote => out.write_str("</blockquote>")?,
|
||||||
Container::List {
|
Container::List { kind, .. } => {
|
||||||
kind: ListKind::Unordered | ListKind::Task,
|
|
||||||
..
|
|
||||||
} => {
|
|
||||||
self.list_tightness.pop();
|
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 { .. } => {
|
Container::ListItem | Container::TaskListItem { .. } => {
|
||||||
out.write_str("</li>")?;
|
out.write_str("</li>")?;
|
||||||
}
|
}
|
||||||
|
|
12
tests/html-ut/ut/lists.test
Normal file
12
tests/html-ut/ut/lists.test
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
```
|
||||||
|
1. item
|
||||||
|
|
||||||
|
para
|
||||||
|
.
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
item
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<p>para</p>
|
||||||
|
```
|
Loading…
Reference in a new issue