mirror of
https://github.com/lise-henry/crowbook
synced 2024-11-18 00:13:55 +01:00
html: correctly turs off numbering
This commit is contained in:
parent
41d06c1749
commit
2806efb39e
@ -179,10 +179,12 @@ impl<'a> HtmlRenderer<'a> {
|
||||
let s = if n == 1 && self.current_numbering {
|
||||
let chapter = self.current_chapter[0];
|
||||
self.book.get_header(chapter, &self.render_vec(vec)).unwrap()
|
||||
} else {
|
||||
} else if self.current_numbering {
|
||||
format!("{} {}", self.get_numbers(), self.render_vec(vec))
|
||||
} else {
|
||||
self.render_vec(vec)
|
||||
};
|
||||
format!("<h{}>{}</h{}>\n", n, self.book.clean(s), n)
|
||||
format!("<h{}>{}</h{}>\n", n, s, n)
|
||||
},
|
||||
Token::Emphasis(ref vec) => format!("<em>{}</em>", self.render_vec(vec)),
|
||||
Token::Strong(ref vec) => format!("<b>{}</b>", self.render_vec(vec)),
|
||||
|
Loading…
Reference in New Issue
Block a user