From cf9550d8df51d927c63176675280d69b86e7a6e2 Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 4 May 2011 17:35:49 -0400 Subject: Build infrastructure improvements. Setting to show remote branches. The JGit team is now publishing 0.12.1 artifacts on the Eclipse Maven site. Yeah! That was the last missing piece for a slick Git:Blit deployment. The build has been reworked to download from Eclipse and to also download source and javadoc jars for setting up a development environment. Made the log4j pattern configurable by operating system. Moved Markdown utils to their own class since I need StringUtils for Build and that introduced a chicken-and-egg scenario. --- src/com/gitblit/utils/StringUtils.java | 46 ---------------------------------- 1 file changed, 46 deletions(-) (limited to 'src/com/gitblit/utils/StringUtils.java') diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java index d52be0e4..ff47a51e 100644 --- a/src/com/gitblit/utils/StringUtils.java +++ b/src/com/gitblit/utils/StringUtils.java @@ -1,16 +1,10 @@ package com.gitblit.utils; -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.List; -import org.tautua.markdownpapers.Markdown; -import org.tautua.markdownpapers.parser.ParseException; public class StringUtils { @@ -113,44 +107,4 @@ public class StringUtils { throw new RuntimeException(t); } } - - public static String transformMarkdown(String markdown) throws java.text.ParseException { - // Read raw markdown content and transform it to html - StringReader reader = new StringReader(markdown); - StringWriter writer = new StringWriter(); - try { - Markdown md = new Markdown(); - md.transform(reader, writer); - return writer.toString(); - } catch (ParseException p) { - throw new java.text.ParseException(p.getMessage(), 0); - } finally { - reader.close(); - try { - writer.close(); - } catch (IOException e) { - } - } - } - - public static String transformMarkdown(Reader markdownReader) throws java.text.ParseException { - // Read raw markdown content and transform it to html - StringWriter writer = new StringWriter(); - try { - Markdown md = new Markdown(); - md.transform(markdownReader, writer); - return writer.toString(); - } catch (ParseException p) { - throw new java.text.ParseException(p.getMessage(), 0); - } finally { - try { - markdownReader.close(); - } catch (IOException e) { - } - try { - writer.close(); - } catch (IOException e) { - } - } - } } -- cgit v1.2.3