James Moger
2011-07-01 d9f68798555e5ba8b4f7ddecf4a8cabbe9bb161a
src/com/gitblit/utils/MarkdownUtils.java
@@ -23,8 +23,21 @@
import org.tautua.markdownpapers.Markdown;
import org.tautua.markdownpapers.parser.ParseException;
/**
 * Utility methods for transforming raw markdown text to html.
 *
 * @author James Moger
 *
 */
public class MarkdownUtils {
   /**
    * Returns the html version of the markdown source text.
    *
    * @param markdown
    * @return html version of markdown text
    * @throws java.text.ParseException
    */
   public static String transformMarkdown(String markdown) throws java.text.ParseException {
      try {
         return transformMarkdown(new StringReader(markdown));
@@ -33,6 +46,14 @@
      }
   }
   /**
    * Returns the html version of the markdown source reader. The reader is
    * closed regardless of success or failure.
    *
    * @param markdownReader
    * @return html version of the markdown text
    * @throws java.text.ParseException
    */
   public static String transformMarkdown(Reader markdownReader) throws java.text.ParseException {
      // Read raw markdown content and transform it to html
      StringWriter writer = new StringWriter();