James Moger
2012-09-27 ad0f8cb37a61a0c94c83a05961386b75e19120fa
src/com/gitblit/wicket/pages/SummaryPage.java
@@ -132,10 +132,11 @@
      add(new LogPanel("commitsPanel", repositoryName, getRepositoryModel().HEAD, r, numberCommits, 0));
      add(new TagsPanel("tagsPanel", repositoryName, r, numberRefs).hideIfEmpty());
      add(new BranchesPanel("branchesPanel", getRepositoryModel(), r, numberRefs).hideIfEmpty());
      add(new BranchesPanel("branchesPanel", getRepositoryModel(), r, numberRefs, false).hideIfEmpty());
      if (getRepositoryModel().showReadme) {
         String htmlText = null;
         String markdownText = null;
         String readme = null;
         try {
            RevCommit head = JGitUtils.getCommit(r, null);
@@ -158,11 +159,12 @@
            }
            if (!StringUtils.isEmpty(readme)) {
               String [] encodings = GitBlit.getEncodings();
               String markdownText = JGitUtils.getStringContent(r, head.getTree(), readme, encodings);
               markdownText = JGitUtils.getStringContent(r, head.getTree(), readme, encodings);
               htmlText = MarkdownUtils.transformMarkdown(markdownText);
            }
         } catch (ParseException p) {
            error(p.getMessage());
            markdownText = MessageFormat.format("<div class=\"alert alert-error\"><strong>{0}:</strong> {1}</div>{2}", getString("gb.error"), getString("gb.markdownFailure"), markdownText);
            htmlText = StringUtils.breakLinesForHtml(markdownText);
         }
         Fragment fragment = new Fragment("readme", "markdownPanel");
         fragment.add(new Label("readmeFile", readme));