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,
|
absatz: Absatz,
|
||||||
}
|
}
|
||||||
impl Td {
|
impl Td {
|
||||||
/// Returns `None` if td doesn't contain anything. used e.g. in § 71b to style table...
|
pub(crate) fn parse(n: &Node) -> Self {
|
||||||
pub(crate) fn parse(n: &Node) -> Option<Self> {
|
|
||||||
Expect::from(n).tag("td");
|
Expect::from(n).tag("td");
|
||||||
|
|
||||||
let mut c = n.children();
|
let mut c = n.children();
|
||||||
|
let absatz = Absatz::parse(c.next().unwrap());
|
||||||
let Some(next) = c.next() else { return None };
|
|
||||||
|
|
||||||
let absatz = Absatz::parse(next);
|
|
||||||
|
|
||||||
Expect::empty(c.next());
|
Expect::empty(c.next());
|
||||||
|
|
||||||
Some(Self { absatz })
|
Self { absatz }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,9 +320,7 @@ impl Tr {
|
|||||||
let mut tds = Vec::new();
|
let mut tds = Vec::new();
|
||||||
|
|
||||||
for child in n.children() {
|
for child in n.children() {
|
||||||
if let Some(td) = Td::parse(&child) {
|
tds.push(Td::parse(&child));
|
||||||
tds.push(td);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Self { tds }
|
Self { tds }
|
||||||
|
Loading…
Reference in New Issue
Block a user