This commit is contained in:
@ -48,7 +48,8 @@ impl Absatz {
|
||||
// If there's a "liste" after an "absatz", the "liste" should be part of the "absatz"
|
||||
while let Some(child) = c.peek() {
|
||||
if Liste::test(child) {
|
||||
content.push(Liste::parse_full(c).get_content())
|
||||
let liste = Liste::parse_full(c).content;
|
||||
content.extend(liste);
|
||||
} else if Table::test(child) {
|
||||
// If there's a "table" after an "absatz", the "table" should be part of the "absatz"
|
||||
let table = Table::parse_full(c);
|
||||
|
@ -25,7 +25,7 @@ use crate::{
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Liste {
|
||||
content: Vec<Content>,
|
||||
pub(crate) content: Vec<Content>,
|
||||
}
|
||||
impl Liste {
|
||||
pub(crate) fn test(n: &Node) -> bool {
|
||||
@ -61,12 +61,4 @@ impl Liste {
|
||||
}
|
||||
Self { content }
|
||||
}
|
||||
|
||||
pub(crate) fn get_content(&self) -> Content {
|
||||
if self.content.len() == 1 {
|
||||
self.content[0].clone()
|
||||
} else {
|
||||
Content::List(self.content.clone())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user