Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ide/editor/src/org/netbeans/modules/editor/url/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static Iterable<int[]> recognizeURLs(CharSequence text) {
case '%': case '_': case '~': case '=': //NOI18N
case '\\':case '&': case '$': case '-': //NOI18N
case '#': case ',': case ':': case ';': //NOI18N
case '!': case '(': case ')': //NOI18N
case '!': case '(': case ')': case '@': //NOI18N
continue OUTER;
}

Expand Down Expand Up @@ -155,7 +155,7 @@ public static Iterable<int[]> recognizeURLs(CharSequence text) {
return result;
}

private static final Pattern URL_PATTERN = Pattern.compile("(ht|f)(tp(s?)|ile)://[0-9a-zA-Z/.?%+_~=\\\\&$\\-#,:!/(/)]*"); //NOI18N
private static final Pattern URL_PATTERN = Pattern.compile("(ht|f)(tp(s?)|ile)://[0-9a-zA-Z/.?%+_~=\\\\&@$\\-#,:!/(/)]*"); //NOI18N

public static Iterable<int[]> recognizeURLsREBased(CharSequence text) {
Matcher m = URL_PATTERN.matcher(text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public void testRecognizeURLs() {
performTest(" http://hudson.gotdns.com/wiki/display/HUDSON/Structured+Form+Submission(v=vs.85).aspx\n", 4,89);
performTest(" http://hudson.gotdns.com/wiki/display/#!/api/dd13\n", 4,53);
performTest(" file:///C:/CodeSourceryG++Lite/share/doc/arm-arm-none-eabi/html/getting-started/sec-cs3-startup.html", 4, 104);
// NETBEANS-4593 accept @
performTest(" https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js\n", 4, 62);
}

@Test
Expand Down Expand Up @@ -143,4 +145,4 @@ private List<List<Integer>> unpackArray(Iterable<int[]> spans) {
return r;
}

}
}