Skip to content

Commit

Permalink
Fix rendering anchor ref IDs in HTML (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
travkin79 committed Jun 23, 2023
1 parent c9761a5 commit afe8802
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public void setAttributes(@NotNull Node node, @NotNull AttributablePart part, @N
attributes.addValue(CLASS_ATTR, attributeNode.getValue());
} else if (attributeNode.isId()) {
if (node instanceof AnchorRefTarget) {
// was already provided via setAnchorRefId
// was already provided via setAnchorRefId, we only have to read it
attributes.remove(Attribute.ID_ATTR);
attributes.addValue(Attribute.ID_ATTR, ((AnchorRefTarget) node).getAnchorRefId());
} else {
attributes.remove(Attribute.ID_ATTR);
attributes.addValue(Attribute.ID_ATTR, attributeNode.getValue());
Expand Down

0 comments on commit afe8802

Please sign in to comment.