mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8176453: Javadoc search: there are issues with generics in parameters
Reviewed-by: jjg, sundar
This commit is contained in:
parent
c131915d0a
commit
71479d029a
1 changed files with 9 additions and 4 deletions
|
@ -32,11 +32,16 @@ var catSearchTags = "SearchTags";
|
|||
var highlight = "<span class=\"resultHighlight\">$&</span>";
|
||||
var camelCaseRegexp = "";
|
||||
var secondaryMatcher = "";
|
||||
function escapeHtml(str) {
|
||||
return str.replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
function getHighlightedText(item) {
|
||||
var ccMatcher = new RegExp(camelCaseRegexp);
|
||||
var label = item.replace(ccMatcher, highlight);
|
||||
if (label === item) {
|
||||
label = item.replace(secondaryMatcher, highlight);
|
||||
var ccMatcher = new RegExp(escapeHtml(camelCaseRegexp));
|
||||
var escapedItem = escapeHtml(item);
|
||||
var label = escapedItem.replace(ccMatcher, highlight);
|
||||
if (label === escapedItem) {
|
||||
var secMatcher = new RegExp(escapeHtml(secondaryMatcher.source), "i");
|
||||
label = escapedItem.replace(secMatcher, highlight);
|
||||
}
|
||||
return label;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue