package api
- Alphabetic
- Public
- All
Type Members
-
class
MarkupParser extends AnyRef
Performs a parse operation from text markup to a document tree without a subsequent render operation.
Performs a parse operation from text markup to a document tree without a subsequent render operation.
In cases where a render operation should follow immediately, it is more convenient to use a laika.api.Transformer instead which combines a parse and a render operation directly.
Example for parsing Markdown:
val res: Either[ParserError, Document] = MarkupParser .of(Markdown) .using(GitHubFlavor) .build .parse("hello *there*)
This is a pure API that does not perform any side-effects. For additional options like File and Stream I/O, templating or parallel processing, use the corresponding builders in the laika-io module.
-
abstract
class
Renderer extends AnyRef
Performs a render operation from a document AST to a target format as a string.
Performs a render operation from a document AST to a target format as a string. The document AST may be obtained by a preceding parse operation or constructed programmatically.
In cases where a parse operation should precede immediately, it is more convenient to use a laika.api.Transformer instead which combines a parse and a render operation directly.
Example for rendering HTML:
val doc: Document = ??? val res: String = Renderer .of(HTML) .build .render(doc)
This is a pure API that does not perform any side-effects. For additional options like File and Stream I/O, templating or parallel processing, use the corresponding builders in the laika-io module.
-
class
Transformer extends AnyRef
Performs a transformation from text markup like Markdown or reStructuredText to a target format like HTML as a String.
Performs a transformation from text markup like Markdown or reStructuredText to a target format like HTML as a String.
Example for transforming from Markdown to HTML:
val res: Either[ParserError, String] = Transformer .from(Markdown) .to(HTML) .using(GitHubFlavor) .build .transform("hello *there*)
This is a pure API that does not perform any side-effects. For additional options like File and Stream I/O, templating or parallel processing, use the corresponding builders in the laika-io module.
Value Members
-
object
MarkupParser
Entry point for building a MarkupParser instance.
-
object
Renderer
Entry point for building a Renderer instance.
-
object
Transformer
Entry point for building a Transformer instance.