mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ignore html control sequences in search (IDEA-CR-23562)
This commit is contained in:
@@ -187,11 +187,11 @@ public class SearchUtil {
|
||||
}
|
||||
|
||||
private static void processUILabel(String title, Set<OptionDescription> configurableOptions, String path) {
|
||||
if (title.startsWith("<html>")) title = StringUtil.stripHtml(title, false);
|
||||
title = HTML_PATTERN.matcher(title).replaceAll(" ");
|
||||
final Set<String> words = SearchableOptionsRegistrar.getInstance().getProcessedWordsWithoutStemming(title);
|
||||
final String regex = "[\\W&&[^\\p{Punct}\\p{Blank}]]";
|
||||
for (String option : words) {
|
||||
configurableOptions.add(new OptionDescription(option, HTML_PATTERN.matcher(title).replaceAll(" ").replaceAll(regex, " "), path));
|
||||
configurableOptions.add(new OptionDescription(option, title.replaceAll(regex, " "), path));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user