class MarkupParser extends AnyRef
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.
- Alphabetic
- By Inheritance
- MarkupParser
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MarkupParser(format: MarkupFormat, config: OperationConfig)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val config: OperationConfig
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
fileSuffixes: Set[String]
The file suffixes this parser will recognize as a supported format.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val format: MarkupFormat
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parse(input: DocumentInput): Either[ParserError, Document]
Parses the specified markup input into a document AST structure.
-
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.
-
def
parse(input: String): Either[ParserError, Document]
Parses the specified markup string into a document AST structure.
-
def
parseUnresolved(input: DocumentInput): Either[ParserError, UnresolvedDocument]
Returns an unresolved document without applying the default rewrite rules and without resolving the configuration header (if present).
Returns an unresolved document without applying the default rewrite rules and without resolving the configuration header (if present).
The default rewrite rules resolve link and image references and rearrange the tree into a hierarchy of sections based on the sequence of header instances found in the document.
The default configuration resolver allows for variable references in the HOCON header of the document to be resolved against values defined in the base configuration.
This low-level hook is rarely used by application code.
- def parseUnresolved(input: String, path: Path): Either[ParserError, UnresolvedDocument]
- def parseUnresolved(input: String): Either[ParserError, UnresolvedDocument]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()