diff options
author | James Moger <james.moger@gitblit.com> | 2011-05-04 17:35:49 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-05-04 17:35:49 -0400 |
commit | cf9550d8df51d927c63176675280d69b86e7a6e2 (patch) | |
tree | 9974201aae08af4e46275465eff30793e13262aa /src/com/gitblit/utils/StringUtils.java | |
parent | b5b4026628c50ffdfa3ceeb93badb613cdca18eb (diff) | |
download | gitblit-cf9550d8df51d927c63176675280d69b86e7a6e2.tar.gz gitblit-cf9550d8df51d927c63176675280d69b86e7a6e2.zip |
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.
Diffstat (limited to 'src/com/gitblit/utils/StringUtils.java')
-rw-r--r-- | src/com/gitblit/utils/StringUtils.java | 46 |
1 files changed, 0 insertions, 46 deletions
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) {
- }
- }
- }
}
|