James Moger
2011-04-20 531cd203f387f8358a2e15da5f6171f5871ea688
src/com/gitblit/wicket/pages/BlobPage.java
@@ -26,6 +26,20 @@
      final String blobPath = WicketUtils.getPath(params);
      String extension = null;
      if (blobPath.lastIndexOf('.') > -1) {
         extension = blobPath.substring(blobPath.lastIndexOf('.') + 1).toLowerCase();
      }
      // see if we should redirect to the markdown page
      for (String ext : GitBlit.self().settings().getStrings(Keys.web.markdownExtensions)) {
         if (ext.equals(extension)) {
            setResponsePage(MarkdownPage.class, params);
            return;
         }
      }
      // standard blob view
      Repository r = getRepository();
      RevCommit commit = JGitUtils.getCommit(r, objectId);
@@ -38,10 +52,6 @@
      add(new LinkPanel("shortlog", "title", commit.getShortMessage(), CommitPage.class, newCommitParameter()));
      add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, blobPath, objectId));
      String extension = null;
      if (blobPath.lastIndexOf('.') > -1) {
         extension = blobPath.substring(blobPath.lastIndexOf('.') + 1);
      }
      // Map the extensions to types
      Map<String, Integer> map = new HashMap<String, Integer>();