Skip to content

Commit

Permalink
fix: Items with same IDs also supposed as paired (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurtsevich-sbb authored May 23, 2024
1 parent 65f80a8 commit b9f4e2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/outerj/daisy/diff/html/dom/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ protected boolean isPolarionRteLink(TagNode node) {
protected boolean pairedLinks(TagNode linkA, TagNode linkB) {
String optionId = getOptionId(linkA.getAttributes());
if (Objects.equals(optionId, getOptionId(linkB.getAttributes()))
&& (Objects.equals(getItemId(linkA.getAttributes()), getPairedItemId(linkB.getAttributes()))
&& (Objects.equals(getItemId(linkA.getAttributes()), getItemId(linkB.getAttributes())) // Items with same IDs also supposed as paired
|| Objects.equals(getItemId(linkA.getAttributes()), getPairedItemId(linkB.getAttributes()))
|| Objects.equals(getItemId(linkB.getAttributes()), getPairedItemId(linkA.getAttributes())))) {
if ("custom".equals(optionId)) {
Node childNodeA = linkA.getNbChildren() == 1 ? linkA.getChild(0) : null;
Expand Down

0 comments on commit b9f4e2c

Please sign in to comment.