feat(elements): multiple lines comment and fixed width area

This commit is contained in:
PoiScript 2019-02-16 17:13:01 +08:00
parent 74a19c2ff7
commit a288a6d554
6 changed files with 72 additions and 45 deletions

View file

@ -98,7 +98,12 @@ pub trait HtmlHandler<W: Write> {
Ok(())
}
fn handle_fixed_width(&mut self, w: &mut W, cont: &str) -> Result<()> {
write!(w, "<pre>{}</pre>", Escape(cont))
for line in cont.lines() {
// remove leading colon
write!(w, "<pre>{}</pre>", Escape(&line[1..]))?;
}
Ok(())
}
fn handle_table_start(&mut self, w: &mut W) -> Result<()> {
Ok(())