diff --git a/src/element.rs b/src/element.rs
index 4e174ba..1f33020 100644
--- a/src/element.rs
+++ b/src/element.rs
@@ -227,6 +227,10 @@ impl<'a> PartialEq<&Element> for ScanElement<'a> {
};
for (attr, val) in self.elem.attrs() {
+ if val == "{scansion:any}" {
+ continue;
+ }
+
match (attr, other.attr(attr)) {
(attr, _) if attr == "scansion:strict" => continue,
(_, None) => return false,
@@ -479,4 +483,14 @@ mod tests {
assert_ne!(scan1, &elem2);
}
+
+ #[test]
+ fn ignore_attr_val_success() {
+ let elem1: Element = ""
+ .parse().unwrap();
+ let elem2: Element = "".parse().unwrap();
+ let scan1 = ScanElement::new(&elem1);
+
+ assert_eq!(scan1, &elem2);
+ }
}