Packages

p

laika

api

package api

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. 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.

  2. 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.

  3. 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

  1. object MarkupParser

    Entry point for building a MarkupParser instance.

  2. object Renderer

    Entry point for building a Renderer instance.

  3. object Transformer

    Entry point for building a Transformer instance.

Ungrouped