diff --git a/src/paragraph/mod.rs b/src/paragraph/mod.rs index 8499a7d..9d86e66 100644 --- a/src/paragraph/mod.rs +++ b/src/paragraph/mod.rs @@ -105,7 +105,7 @@ impl Parser { Regex::new("").unwrap(); // Find all matches for tags and iterate over them in reverse to avoid messing up the indices - for cap in ueberschrift_regex.captures_iter(&xml) { + for cap in ueberschrift_regex.captures_iter(xml) { let ueberschrift_content = &cap[1]; // Check if there's an following the diff --git a/src/paragraph/parser/mod.rs b/src/paragraph/parser/mod.rs index 319a0de..2b5a783 100644 --- a/src/paragraph/parser/mod.rs +++ b/src/paragraph/parser/mod.rs @@ -44,7 +44,7 @@ impl<'a> From<&'a Node<'a, 'a>> for Expect<'a> { impl<'a> Expect<'a> { fn tag(&self, value: &str) { assert!( - !(self.node.tag_name().name() != value), + self.node.tag_name().name() == value, "Expected tag '{value}', got {} (tag: {}, content: {:?})", self.node.tag_name().name(), self.node.tag_name().name(),