Skip to content

Commit

Permalink
Ignore namespace differences during SVG comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
martinweiler committed Sep 24, 2024
1 parent 5810447 commit 63e9df7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.xmlunit.builder.DiffBuilder;
import org.xmlunit.builder.Input;
import org.xmlunit.diff.ComparisonResult;
import org.xmlunit.diff.ComparisonType;
import org.xmlunit.diff.Diff;
import org.xmlunit.diff.DifferenceEvaluators;

Expand All @@ -41,6 +42,9 @@ public CustomSVGDiffer(String content) {
if (comparison.getControlDetails().getTarget().getNodeName().equals("svg")) {
return ComparisonResult.SIMILAR;
}
if (comparison.getType() == ComparisonType.NAMESPACE_URI) {
return ComparisonResult.SIMILAR;
}
return outcome;
}));
}
Expand Down

0 comments on commit 63e9df7

Please sign in to comment.