• R/O
  • SSH
  • HTTPS

fess: Commit


Commit MetaInfo

Revisão1774 (tree)
Hora2013-08-22 06:26:50
Autorshinsuke

Mensagem de Log

fixed #31335

Mudança Sumário

Diff

--- fess/trunk/src/main/java/jp/sf/fess/helper/ViewHelper.java (revision 1773)
+++ fess/trunk/src/main/java/jp/sf/fess/helper/ViewHelper.java (revision 1774)
@@ -75,6 +75,10 @@
7575
7676 public String[] highlightingFields = new String[] { "hl_content", "digest" };
7777
78+ public String highlightTagPre = "<em>";
79+
80+ public String highlightTagPost = "</em>";
81+
7882 protected boolean useSession = true;
7983
8084 private final Map<String, String> pageCacheMap = new ConcurrentHashMap<String, String>();
@@ -134,7 +138,7 @@
134138 return "";
135139 }
136140
137- private String removeEmTag(final String str) {
141+ protected String removeEmTag(final String str) {
138142 return str.replaceAll("<em>", "").replaceAll("</em>", "");
139143 }
140144
@@ -147,7 +151,8 @@
147151 for (final String query : queries) {
148152 newContent = Pattern
149153 .compile(Pattern.quote(query), Pattern.CASE_INSENSITIVE)
150- .matcher(newContent).replaceAll("<em>" + query + "</em>");
154+ .matcher(newContent)
155+ .replaceAll(highlightTagPre + query + highlightTagPost);
151156 }
152157 return newContent;
153158 }
Show on old repository browser