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.

Modifiers

public abstract

Fields


MARKDOWN_PARSER

Constant

A parser for markdown. If commonmark is unavailable this parser will not work.

Type

Parser

Modifiers

public static final

SANITISER

Constant

A simple HTML sanitiser that converts problem characters to their &#.. format.

This cannot sanitise all input, so a more precise version may be preferred.

Type

Parser

Modifiers

public static final



Methods


available ()

Method

Whether this parser is available for use.

If unavailable, the parse method should return the raw content.

Return Type

boolean

Modifiers

public

parse (String)

Abstract Method

The method to parse the raw content.

This should return the parsed result.

IndexTypeName
1Stringstring
Return Type

String

Modifiers

public abstract