aboutsummaryrefslogtreecommitdiffstats
path: root/src/epub.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/epub.rs')
-rw-r--r--src/epub.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/epub.rs b/src/epub.rs
index b5510c8..fb0445a 100644
--- a/src/epub.rs
+++ b/src/epub.rs
@@ -141,9 +141,23 @@ fn render(n: Node, buf: &mut String, attrs: &mut Attrs) {
for c in n.children() {
render(c, buf, attrs);
}
- attrs.push((buf.len(), Attribute::Reset));
+ attrs.push((buf.len(), Attribute::NoBold));
buf.push('\n');
}
+ "em" => {
+ attrs.push((buf.len(), Attribute::Italic));
+ for c in n.children() {
+ render(c, buf, attrs);
+ }
+ attrs.push((buf.len(), Attribute::NoItalic));
+ }
+ "strong" => {
+ attrs.push((buf.len(), Attribute::Bold));
+ for c in n.children() {
+ render(c, buf, attrs);
+ }
+ attrs.push((buf.len(), Attribute::NoBold));
+ }
"blockquote" | "p" | "tr" => {
buf.push('\n');
for c in n.children() {