feat: list parsing
This commit is contained in:
parent
75362bd2a8
commit
ad9f29bcb9
9 changed files with 512 additions and 122 deletions
|
|
@ -85,11 +85,25 @@ impl<W: Write> Handler<W> for HtmlHandler {
|
|||
fn handle_end_dyn_block(&mut self, w: &mut W) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
fn handle_list_start(&mut self, w: &mut W) -> Result<()> {
|
||||
Ok(())
|
||||
fn handle_start_list(&mut self, w: &mut W, is_ordered: bool) -> Result<()> {
|
||||
if is_ordered {
|
||||
write!(w, "<ol>")
|
||||
} else {
|
||||
write!(w, "<ul>")
|
||||
}
|
||||
}
|
||||
fn handle_list_end(&mut self, w: &mut W) -> Result<()> {
|
||||
Ok(())
|
||||
fn handle_end_list(&mut self, w: &mut W, is_ordered: bool) -> Result<()> {
|
||||
if is_ordered {
|
||||
write!(w, "</ol>")
|
||||
} else {
|
||||
write!(w, "</ul>")
|
||||
}
|
||||
}
|
||||
fn handle_start_list_item(&mut self, w: &mut W) -> Result<()> {
|
||||
write!(w, "<li>")
|
||||
}
|
||||
fn handle_end_list_item(&mut self, w: &mut W) -> Result<()> {
|
||||
write!(w, "</li>")
|
||||
}
|
||||
fn handle_aff_keywords(&mut self, w: &mut W) -> Result<()> {
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue