James Moger
2011-07-22 88598bb2f779b73479512d818c675dea8fa72138
src/com/gitblit/build/BuildSite.java
@@ -55,11 +55,11 @@
 */
public class BuildSite {
   private final static String CASE_SENSITIVE = "CASE-SENSITIVE";
   private static final String CASE_SENSITIVE = "CASE-SENSITIVE";
   private final static String RESTART_REQUIRED = "RESTART REQUIRED";
   private static final String RESTART_REQUIRED = "RESTART REQUIRED";
   private final static String SINCE = "SINCE";
   private static final String SINCE = "SINCE";
   public static void main(String... args) {
      Params params = new Params();
@@ -159,7 +159,8 @@
                     if (endCode == 0) {
                        strippedContent.append(markdownContent.substring(0, beginCode));
                     } else {
                        strippedContent.append(markdownContent.substring(endCode, beginCode));
                        strippedContent.append(markdownContent
                              .substring(endCode, beginCode));
                     }                     
                     strippedContent.append(nomarkdownKey);
                     endCode = markdownContent.indexOf(endToken, beginCode);
@@ -169,7 +170,8 @@
                  // get remainder of text
                  if (endCode < markdownContent.length()) {
                     strippedContent.append(markdownContent.substring(endCode, markdownContent.length()));
                     strippedContent.append(markdownContent.substring(endCode,
                           markdownContent.length()));
                  }
                  markdownContent = strippedContent.toString();
                  nmd++;                  
@@ -264,14 +266,19 @@
         for (String comment : setting.comments) {
            if (comment.contains(SINCE) || comment.contains(RESTART_REQUIRED)
                  || comment.contains(CASE_SENSITIVE)) {
               sb.append(MessageFormat.format("<span style=\"color:#004000;\"># <i>{0}</i></span>", transformMarkdown(comment)));
               sb.append(MessageFormat.format(
                     "<span style=\"color:#004000;\"># <i>{0}</i></span>",
                     transformMarkdown(comment)));
            } else {
               sb.append(MessageFormat.format("<span style=\"color:#004000;\"># {0}</span>", transformMarkdown(comment)));
               sb.append(MessageFormat.format("<span style=\"color:#004000;\"># {0}</span>",
                     transformMarkdown(comment)));
            }
            sb.append("<br/>\n");
         }
         if (!StringUtils.isEmpty(setting.name)) {
            sb.append(MessageFormat.format("<span style=\"color:#000080;\">{0}</span> = <span style=\"color:#800000;\">{1}</span>", setting.name, StringUtils.escapeForHtml(setting.value, false)));
            sb.append(MessageFormat
                  .format("<span style=\"color:#000080;\">{0}</span> = <span style=\"color:#800000;\">{1}</span>",
                        setting.name, StringUtils.escapeForHtml(setting.value, false)));
         }
         sb.append("<br/>\n");
      }
@@ -303,6 +310,9 @@
      System.exit(0);
   }
   /**
    * Setting represents a setting with its comments from the properties file.
    */
   private static class Setting {
      final String name;
      final String value;
@@ -315,6 +325,9 @@
      }
   }
   /**
    * JCommander Parameters class for BuildSite.
    */
   @Parameters(separators = " ")
   private static class Params {