From 2831f34b009cf9fa42ee1095017987d066d81335 Mon Sep 17 00:00:00 2001 From: Dzmitry Yurtsevich Date: Thu, 23 May 2024 10:39:32 +0200 Subject: [PATCH] fix: Items with same IDs also supposed as paired --- src/main/java/org/outerj/daisy/diff/html/dom/Node.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/outerj/daisy/diff/html/dom/Node.java b/src/main/java/org/outerj/daisy/diff/html/dom/Node.java index 2ba52ae..53b8c3f 100644 --- a/src/main/java/org/outerj/daisy/diff/html/dom/Node.java +++ b/src/main/java/org/outerj/daisy/diff/html/dom/Node.java @@ -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;