MarkupParser

laika.api.MarkupParser
See theMarkupParser companion object
class MarkupParser

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
Source
MarkupParser.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def parse(input: String): Either[ParserError, Document]

Parses the specified markup string into a document AST structure.

Parses the specified markup string into a document AST structure.

Attributes

Source
MarkupParser.scala
def parse(input: String, path: Path): Either[ParserError, Document]

Parses the specified markup string into a document AST structure.

Parses the specified markup string into a document AST structure. The given (virtual) path will be assigned to the result.

Attributes

Source
MarkupParser.scala
def parseUnresolved(input: String): Either[ParserError, UnresolvedDocument]

Attributes

Source
MarkupParser.scala
def parseUnresolved(input: String, path: Path): Either[ParserError, UnresolvedDocument]

Attributes

Source
MarkupParser.scala

Concrete fields

Attributes

Source
MarkupParser.scala
val fileSuffixes: Set[String]

The file suffixes this parser will recognize as a supported format.

The file suffixes this parser will recognize as a supported format.

Attributes

Source
MarkupParser.scala

Attributes

Source
MarkupParser.scala