Skip to content

Commit

Permalink
add missing coordinates when the paragraph continues after a referenc…
Browse files Browse the repository at this point in the history
…e callout
  • Loading branch information
lfoppiano committed Jan 18, 2024
1 parent cbc77d5 commit 4d0acef
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -1488,6 +1488,13 @@ public StringBuilder toTEITextPiece(StringBuilder buffer,

curDiv.appendChild(curParagraph);
curParagraphTokens = new ArrayList<>();
} else {
if (config.isGenerateTeiCoordinates("p")) {
String coords = LayoutTokensUtil.getCoordsString(clusterTokens);
if (curParagraph.getAttribute("coords") != null && !curParagraph.getAttributeValue("coords").contains(coords)) {
curParagraph.addAttribute(new Attribute("coords", curParagraph.getAttributeValue("coords") + ";" + coords));
}
}
}
curParagraph.appendChild(clusterContent);
curParagraphTokens.addAll(clusterTokens);
Expand Down

0 comments on commit 4d0acef

Please sign in to comment.