|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pegdown.PegDownProcessor
public class PegDownProcessor
A clean and lightweight Markdown-to-HTML filter based on a PEG parser implemented with parboiled. Note: A PegDownProcessor is not thread-safe (since it internally reused the parboiled parser instance). If you need to process markdown source in parallel create one PegDownProcessor per thread!
| Field Summary | |
|---|---|
static long |
DEFAULT_MAX_PARSING_TIME
|
Parser |
parser
|
| Constructor Summary | |
|---|---|
PegDownProcessor()
Creates a new processor instance without any enabled extensions and the default parsing timeout. |
|
PegDownProcessor(int options)
Creates a new processor instance with the given Extensions and the default parsing timeout. |
|
PegDownProcessor(int options,
long maxParsingTimeInMillis)
Creates a new processor instance with the given Extensions and parsing timeout. |
|
PegDownProcessor(int options,
long maxParsingTimeInMillis,
PegDownPlugins plugins)
Creates a new processor instance with the given Extensions, parsing timeout and plugins. |
|
PegDownProcessor(int options,
PegDownPlugins plugins)
Creates a new processor instance with the given Extensions and plugins. |
|
PegDownProcessor(long maxParsingTimeInMillis)
Creates a new processor instance without any enabled extensions and the given parsing timeout. |
|
PegDownProcessor(Parser parser)
Creates a new processor instance using the given Parser. |
|
| Method Summary | |
|---|---|
java.lang.String |
markdownToHtml(char[] markdownSource)
Converts the given markdown source to HTML. |
java.lang.String |
markdownToHtml(char[] markdownSource,
LinkRenderer linkRenderer)
Converts the given markdown source to HTML. |
java.lang.String |
markdownToHtml(char[] markdownSource,
LinkRenderer linkRenderer,
java.util.Map<java.lang.String,VerbatimSerializer> verbatimSerializerMap)
|
java.lang.String |
markdownToHtml(java.lang.String markdownSource)
Converts the given markdown source to HTML. |
java.lang.String |
markdownToHtml(java.lang.String markdownSource,
LinkRenderer linkRenderer)
Converts the given markdown source to HTML. |
java.lang.String |
markdownToHtml(java.lang.String markdownSource,
LinkRenderer linkRenderer,
java.util.Map<java.lang.String,VerbatimSerializer> verbatimSerializerMap)
|
RootNode |
parseMarkdown(char[] markdownSource)
Parses the given markdown source and returns the root node of the generated Abstract Syntax Tree. |
char[] |
prepareSource(char[] source)
Adds two trailing newlines. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_MAX_PARSING_TIME
public final Parser parser
| Constructor Detail |
|---|
public PegDownProcessor()
public PegDownProcessor(long maxParsingTimeInMillis)
public PegDownProcessor(int options)
Extensions and the default parsing timeout.
options - the flags of the extensions to enable as a bitmask
public PegDownProcessor(int options,
long maxParsingTimeInMillis)
Extensions and parsing timeout.
options - the flags of the extensions to enable as a bitmaskmaxParsingTimeInMillis - the parsing timeout
public PegDownProcessor(int options,
PegDownPlugins plugins)
Extensions and plugins.
options - the flags of the extensions to enable as a bitmaskplugins - the plugins to use
public PegDownProcessor(int options,
long maxParsingTimeInMillis,
PegDownPlugins plugins)
Extensions, parsing timeout and plugins.
options - the flags of the extensions to enable as a bitmaskmaxParsingTimeInMillis - the parsing timeoutplugins - the plugins to usepublic PegDownProcessor(Parser parser)
parser - the parser instance to use| Method Detail |
|---|
public java.lang.String markdownToHtml(java.lang.String markdownSource)
markdownSource - the markdown source to convert
public java.lang.String markdownToHtml(java.lang.String markdownSource,
LinkRenderer linkRenderer)
markdownSource - the markdown source to convertlinkRenderer - the LinkRenderer to use
public java.lang.String markdownToHtml(java.lang.String markdownSource,
LinkRenderer linkRenderer,
java.util.Map<java.lang.String,VerbatimSerializer> verbatimSerializerMap)
public java.lang.String markdownToHtml(char[] markdownSource)
markdownSource - the markdown source to convert
public java.lang.String markdownToHtml(char[] markdownSource,
LinkRenderer linkRenderer)
markdownSource - the markdown source to convertlinkRenderer - the LinkRenderer to use
public java.lang.String markdownToHtml(char[] markdownSource,
LinkRenderer linkRenderer,
java.util.Map<java.lang.String,VerbatimSerializer> verbatimSerializerMap)
public RootNode parseMarkdown(char[] markdownSource)
markdownSource - the markdown source to convert
public char[] prepareSource(char[] source)
source - the markdown source to process
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||