Skip to content

Commit

Permalink
Only adjust the location if it contains nested @link
Browse files Browse the repository at this point in the history
  • Loading branch information
testforstephen committed Aug 15, 2024
1 parent e5af720 commit c9761c4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,10 @@ private MethodRef matchesMethodReference(DCErroneous tree, String body) {
int startPosition = this.docComment.getSourcePosition(tree.getStartPosition()) + 4;
String prefix = value.substring(0, hash);
int link = prefix.indexOf("@link");
prefix = prefix.substring(link + 5);
startPosition = startPosition + link + 5;
if (link != -1) {
prefix = prefix.substring(link + 5);
startPosition = startPosition + link + 5;
}
MethodRef ref = this.ast.newMethodRef();
if( prefix != null && !prefix.isBlank()) {
Name n = toName(prefix, startPosition);
Expand Down

0 comments on commit c9761c4

Please sign in to comment.