Change highlight color.

This commit is contained in:
takezoe
2013-07-18 20:12:08 +09:00
parent e7b9293f3b
commit eef2f26707

View File

@@ -111,7 +111,7 @@ trait IndexControllerBase extends ControllerBase { self: RepositoryService
val lineNumber = content.substring(0, indices.min).split("\n").size - 1
val highlightText = StringUtil.escapeHtml(content.split("\n").drop(lineNumber).take(5).mkString("\n"))
.replaceAll("(?i)(" + keywords.map("\\Q" + _ + "\\E").mkString("|") + ")",
"<span style=\"background-color: yellow;\">$1</span>")
"<span style=\"background-color: #ffff88;;\">$1</span>")
(highlightText, lineNumber + 1)
} else {
(content.split("\n").take(5).mkString("\n"), 1)