diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs index 1edece5..fabdafe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -130,13 +130,7 @@ impl Bk { let mut chapter = Vec::new(); for n in doc.descendants() { match n.tag_name().name() { - "h1" | "h2" | "h3" | "h4" | "h5" | "h6" => { - let text = n.descendants().find(|n| n.is_text()).unwrap(); - chapter.push(format!("# {}", text.text().unwrap())); - chapter.push(String::from("")); - } - //"div" => chapter.push(String::from("")), - "p" => { + "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" => { chapter.push(n.descendants() .filter(|n| n.is_text()) .map(|n| n.text().unwrap()) |