Compare commits
No commits in common. "4540cedde632812f69852c09157a8bcea2e6f8e1" and "172215abaa7c041e9ce16c9de9a236932dcf8070" have entirely different histories.
4540cedde6
...
172215abaa
@ -1,32 +0,0 @@
|
||||
[law]
|
||||
id = 20002128
|
||||
name = "Universitätsgesetz 2002"
|
||||
|
||||
[[law.classifiers]]
|
||||
name = "Teil"
|
||||
is_root = true
|
||||
match_function = "contains"
|
||||
|
||||
[[law.classifiers]]
|
||||
name = " Abschnitt"
|
||||
is_root = false
|
||||
match_function = "contains"
|
||||
|
||||
[[law.classifiers]]
|
||||
name = "Unterabschnitt"
|
||||
is_root = false
|
||||
match_function = "contains"
|
||||
|
||||
|
||||
[parser]
|
||||
remove_strings = [
|
||||
"<n>", "</n>",
|
||||
"""<abstand ct="text" halign="l" />""",
|
||||
"<br />",
|
||||
"<i>", "</i>",
|
||||
"<u>", "</u>"
|
||||
]
|
||||
|
||||
[[parser.replace_rules]]
|
||||
find = "<gdash />" # Should be at the same level as the other "Theil"e
|
||||
replace_with = "-"
|
@ -297,19 +297,15 @@ pub(crate) struct Td {
|
||||
absatz: Absatz,
|
||||
}
|
||||
impl Td {
|
||||
/// Returns `None` if td doesn't contain anything. used e.g. in § 71b to style table...
|
||||
pub(crate) fn parse(n: &Node) -> Option<Self> {
|
||||
pub(crate) fn parse(n: &Node) -> Self {
|
||||
Expect::from(n).tag("td");
|
||||
|
||||
let mut c = n.children();
|
||||
|
||||
let Some(next) = c.next() else { return None };
|
||||
|
||||
let absatz = Absatz::parse(next);
|
||||
let absatz = Absatz::parse(c.next().unwrap());
|
||||
|
||||
Expect::empty(c.next());
|
||||
|
||||
Some(Self { absatz })
|
||||
Self { absatz }
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,9 +320,7 @@ impl Tr {
|
||||
let mut tds = Vec::new();
|
||||
|
||||
for child in n.children() {
|
||||
if let Some(td) = Td::parse(&child) {
|
||||
tds.push(td);
|
||||
}
|
||||
tds.push(Td::parse(&child));
|
||||
}
|
||||
|
||||
Self { tds }
|
||||
|
Loading…
Reference in New Issue
Block a user