This commit is contained in:
parent
33e10185c0
commit
d07bc726b9
@ -102,7 +102,7 @@ impl Abschnitt {
|
||||
}
|
||||
}
|
||||
value = value.trim().into();
|
||||
if value == "" {
|
||||
if value.is_empty() {
|
||||
panic!("Expected at least on erltext-absatz after title meta-data");
|
||||
}
|
||||
|
||||
@ -190,14 +190,12 @@ impl Abschnitt {
|
||||
// If there's a "table" after an "absatz", the "table" should be part of the "absatz"
|
||||
let table = Table::parse_full(c);
|
||||
content.extend(table.iter().cloned());
|
||||
} else if Absatz::test_with_typ(child, "satz") {
|
||||
// After a 'absatz' there can be a '<absatz typ="satz"' which should be part of the first absatz
|
||||
} else if Absatz::test_with_typ(child, "satz")
|
||||
|| Absatz::test_with_typ(child, "erltext")
|
||||
{
|
||||
// After a 'absatz' there can be a '<absatz typ="[satz|erltext]"' which should be part of the first absatz
|
||||
// (e.g. 1209 ABGB)
|
||||
content.push(Content::Text(Absatz::parse(c.next().unwrap()).content))
|
||||
} else if Absatz::test_with_typ(child, "erltext") {
|
||||
// After a 'absatz' there can be a '<absatz typ="erltext"' which should be part of the first absatz
|
||||
// (e.g. 51 StGB)
|
||||
content.push(Content::Text(Absatz::parse(c.next().unwrap()).content))
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user