Revision: 50
Author: maka82
Date: Mon Aug 17 11:18:07 2009
Log: error in code highlighting is fixed
http://code.google.com/p/apache-rat-pd/source/detail?r=50
Modified:
/trunk/src/main/java/org/apache/rat/pd/report/HtmlReportGenerator.java
=======================================
--- /trunk/src/main/java/org/apache/rat/pd/report/HtmlReportGenerator.java
Mon Aug 17 10:54:36 2009
+++ /trunk/src/main/java/org/apache/rat/pd/report/HtmlReportGenerator.java
Mon Aug 17 11:18:07 2009
@@ -144,15 +144,16 @@
*/
protected String formatBetter(List<String> matchedCode, String
codeInClass) {
String toRet = codeInClass;
+ // basic code highlighting
for (int i = 0; i < matchedCode.size(); i++) {
toRet = toRet.replaceAll("(?i:("
+
regexGenerator.stringToRegex(matchedCode.get(i)) + "))",
"<b><span style=\"color: #800000\">" +
matchedCode.get(i)
+ "</span></b>");
}
- // basic code highlighting
+ // basic code formating
toRet = toRet.replaceAll("\\n",
- "<BR>").replaceAll(" ", " ").replaceAll("\\t",
+ "<BR>").replaceAll("\\t",
" ");
return toRet;
}