Skip to content

Commit

Permalink
Invalid links to line range in external poms in hover #505
Browse files Browse the repository at this point in the history
Fix avoids adding title to links due to problem on Windos OS

Fixes: #505
  • Loading branch information
vrubezhny authored and mickaelistria committed Sep 1, 2023
1 parent c42b555 commit 2c7540b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ public static String toLink(String uri, Range range, String message, String titl
link.append('#').append(selection);
}
}
if (title != null && title.trim().length() > 0) {
link.append(' ').append('"').append(title.trim()).append('"');
}

// We do not add link titles as they create problems on Windows
// See: https://github.com/eclipse/lemminx-maven/issues/505
// if (title != null && title.trim().length() > 0) {
// link.append(' ').append('"').append(title.trim()).append('"');
// }
link.append(')');
}
return link.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,7 @@ public void testHoverFromToolsRetrySpringFrameworImlDummyToSpringContextDependen
+ "**The managed version is 5.3.3.** " //
+ "**The artifact is managed in [org.springframework:spring-framework-bom:5.3.3](" //
+ localRepoDirectory.toURI().toString() //
+ "org/springframework/spring-framework-bom/5.3.3/spring-framework-bom-5.3.3.pom#L63,22-L63,22" //
+ " \"org.springframework:spring-framework-bom:5.3.3\")**" + NL //
+ "org/springframework/spring-framework-bom/5.3.3/spring-framework-bom-5.3.3.pom#L63,22-L63,22)**" + NL //
+ "**The managed scope is: \"compile\"**";
Range expectedHoverRange = r(34, 15, 34, 29);

Expand Down Expand Up @@ -575,8 +574,7 @@ public void testHoverFromToolsRetrySpringFrameworImlDummyToToolsRetrySpringframe
+ "**The managed version is 0.0.1-SNAPSHOT.** " //
+ "**The artifact is managed in [mygroup:tools.retry.springframework:0.0.1-SNAPSHOT](" //
+ new File(getClass().getResource(WORKSPACE_PATH).getFile()).toURI().toString() //
+ "tools/modules/retry-springframework/pom.xml#L35,18-L35,18" //
+" \"mygroup:tools.retry.springframework:0.0.1-SNAPSHOT\")**" + NL //
+ "tools/modules/retry-springframework/pom.xml#L35,18-L35,18)**" + NL //
+ "**The managed scope is: \"compile\"**";
Range expectedHoverRange = r(20, 15, 20, 52);

Expand Down

0 comments on commit 2c7540b

Please sign in to comment.