Package helma.util
Class MarkdownProcessor
- java.lang.Object
-
- helma.util.MarkdownProcessor
-
public class MarkdownProcessor extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MarkdownProcessor()
MarkdownProcessor(java.io.File file)
MarkdownProcessor(java.lang.String text)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String[]
getLink(java.lang.String linkId)
Retrieve a link defined in the source text.protected java.lang.String[]
lookupLink(java.lang.String linkId)
Method to override for extended link lookup, e.g.static void
main(java.lang.String[] args)
protected void
openTag(java.lang.String tag, java.lang.StringBuilder builder)
Method to override to create custom HTML tags.java.lang.String
process()
java.lang.String
process(java.lang.String text)
java.lang.String
processLinkText(java.lang.String text)
-
-
-
Method Detail
-
process
public java.lang.String process(java.lang.String text)
-
process
public java.lang.String process()
-
processLinkText
public java.lang.String processLinkText(java.lang.String text)
-
getLink
protected java.lang.String[] getLink(java.lang.String linkId)
Retrieve a link defined in the source text. If the link is not found, we call lookupLink(String) to retrieve it from an external source.- Parameters:
linkId
- the link id- Returns:
- a String array with the url as first element and the link title as second.
-
lookupLink
protected java.lang.String[] lookupLink(java.lang.String linkId)
Method to override for extended link lookup, e.g. for integration into a wiki- Parameters:
linkId
- the link id- Returns:
- a String array with the url as first element and the link title as second.
-
openTag
protected void openTag(java.lang.String tag, java.lang.StringBuilder builder)
Method to override to create custom HTML tags.- Parameters:
tag
- the html tag to generatebuilder
- the java.lang.StringBuilder to generate the string
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
- Throws:
java.io.IOException
-
-