laika.api
Members list
Packages
Type members
Classlikes
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.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Entry point for building a MarkupParser instance.
Entry point for building a MarkupParser instance.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MarkupParser.type
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.
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.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
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.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Entry point for building a Transformer instance.
Entry point for building a Transformer instance.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Transformer.type