Package helma.util

# Class MarkdownProcessor

java.lang.Object
helma.util.MarkdownProcessor

public class MarkdownProcessor extends Object

## Constructor Summary

Constructors
Constructor
Description
`MarkdownProcessor()`
`MarkdownProcessor(File file)`
`MarkdownProcessor(String text)`

## Method Summary

Modifier and Type
Method
Description
`protected String[]`
`getLink(String linkId)`
Retrieve a link defined in the source text.
`protected String[]`
`lookupLink(String linkId)`
Method to override for extended link lookup, e.g.
`static void`
`main(String[] args)`
`protected void`
`openTag(String tag, StringBuilder builder)`
Method to override to create custom HTML tags.
`String`
`process()`
`String`
`process(String text)`
`String`
`processLinkText(String text)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MarkdownProcessor

public MarkdownProcessor()

### MarkdownProcessor

public MarkdownProcessor(String text)

### MarkdownProcessor

public MarkdownProcessor(File file) throws IOException

Throws:
  `IOException`

## Method Details

### process

public String process(String text)

### process

public String process()

### processLinkText

public String processLinkText(String text)

### getLink

protected String[] getLink(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 String[] lookupLink(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(String tag, StringBuilder builder)
Method to override to create custom HTML tags.

Parameters:
  `tag` - the html tag to generate
  `builder` - the java.lang.StringBuilder to generate the string

### main

public static void main(String[] args) throws IOException

Throws:
  `IOException`