Parser
Interface
A content parser that converts raw input to formatted text.
This can be used in the write
function of elements.
If the parser is unavailable, the parse method should return the raw, unformatted content.
The parser always returns a text format even if its output is HTML.
public abstract
Fields
MARKDOWN_PARSER
ConstantA parser for markdown. If commonmark
is unavailable this parser will not work.
Parser
public static final
SANITISER
ConstantA simple HTML sanitiser that converts problem characters to their &#..
format.
This cannot sanitise all input, so a more precise version may be preferred.
Parser
public static final
Methods
available ()
MethodWhether this parser is available for use.
If unavailable, the parse method should return the raw content.
boolean
public
parse (String)
Abstract MethodThe method to parse the raw content.
This should return the parsed result.
Index | Type | Name |
---|---|---|
1 | String | string |
String
public abstract