aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Campos <james.r.campos@gmail.com>2021-01-04 18:27:21 -0800
committerJames Campos <james.r.campos@gmail.com>2021-01-04 18:27:21 -0800
commitb6dda9fa8e1c159412c177fb3cc0a55652091d35 (patch)
treebcc340f858a3f59984b3e243f7e6febf45df5f34
parent8c36ebb0d040dcfa70a399cd2e71647c5d003cfe (diff)
downloadbk-b6dda9fa8e1c159412c177fb3cc0a55652091d35.tar.gz
subsections
-rw-r--r--src/epub.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/epub.rs b/src/epub.rs
index fa88234..7357cda 100644
--- a/src/epub.rs
+++ b/src/epub.rs
@@ -250,7 +250,8 @@ fn epub2(doc: Document, nav: &mut HashMap<String, String>) {
.text()
.unwrap()
.to_string();
- nav.insert(path, text);
+ // TODO subsections
+ nav.entry(path).or_insert(text);
});
}
fn epub3(doc: Document, nav: &mut HashMap<String, String>) {