Builder API for block parsers.
Builds a block parser definition lazily by passing the recursive parsers of the host language.
Defines a parser for a single kind of block element, like a quoted block or a bullet list for example.
Specifies the position a block element is allowed to appear in.
Specifies the position a block element is allowed to appear in.
RootOnly
elements can only appear on the top level of the document hierarchy,
while NestedOnly
can only appear nested within other elements, e.g. as part
of a list item or within a quoted block. Any
allows block elements in any position.
An extension bundle is a collection of parser extensions, rewrite rules, render themes and other features to be applied to parse, render and transform operations.
An extension bundle is a collection of parser extensions, rewrite rules, render themes and other features to be applied to parse, render and transform operations. It serves as a central registry for all of Laika's extension and customization hooks.
The base trait contains empty implementations for all these features, therefore any bundle implementation only needs to override the relevant members.
If the bundle implementation is not parameterized, the most convenient choice for users would be to simply implement it as an object, like all built-in extensions do:
object MyExtensions extends ExtensionBundle { // override one or more members }
This way a user can easily pass it to the operation builders:
Transform .from(Markdown).to(HTML) .using(MyExtensions) .fromFile("hello.md").toFile("hello.html")
Bundles extensions for the text markup parsers defined for the host language to support additional syntax not recognized by the base parsers.
Bundles extensions for the text markup parsers defined for the host language to support additional syntax not recognized by the base parsers.
When extension parsers fail for a given input the built-in parsers will still be tried for the same block or span respectively.
parsers for block elements in text markup, complementing the parsers of the host language
parsers for span elements in text markup, complementing the parsers of the host language
hooks for markup parsers to control aspects beyond the individual span and block parsers
Builds a parser definition lazily by passing the recursive parsers of the host language.
Builds a parser definition lazily by passing the recursive parsers of the host language.
This indirection is needed when supplying parser implementations as many parsers recursively parse child elements. A list parser for example needs to be able to detect any other block or span element within a list item. But since it has no way of knowing which extensions a user might have added to the host language, those parsers are supplied from the outside by the parser engine.
Bundles a collection of all types of parsers used in a transformation.
Bundles a collection of all types of parsers used in a transformation.
The parsers for text markup and configuration headers are meant to complement base parsers defined by the host language. If they fail for a given input the built-in parsers will still be tried for the same block, span or configuration header respectively.
The parsers for stylesheets and templates on the other hand are meant to overwrite any previously installed parsers.
parsers for block elements in text markup, complementing the parsers of the host language
parsers for span elements in text markup, complementing the parsers of the host language
hooks for markup parsers to control aspects beyond the individual span and block parsers
parser for configuration headers in text markup and template documents
parser for template documents
parser for CSS documents
Defines a parser for a single kind of text markup, like a literal text span or a bullet list for example.
Hooks for markup parsers to control aspects beyond the individual span and block parsers defined for the host language.
Hooks for markup parsers to control aspects beyond the individual span and block parsers defined for the host language.
function invoked for every block container, allowing post-processing of the result
function invoked after parsing but before rewriting, allowing to modify the document
function invoked before parsing, allowing to pre-process the input
Indicates whether a parser should be applied before the base parsers of the host language (high precedence) or after them (low precedence).
Collects templates, styles and custom render functions to form a theme for a specific output format.
Builder API for span parsers.
Builds a span parser definition lazily by passing the recursive parsers of the host language.
Defines a parser for a single kind of span element, like a literal text span or a link reference for example.
Defines a parser for a single kind of span element, like a literal text span or a link reference for example.
the start character (allows performance optimizations)
the parser for the span element after the start character
indicates whether this parser produces child elements by recursively applying the parsers for the host language
indicates whether the parser should be applied before the base parsers of the host language (high precedence) or after them
A collection of static documents to be copied over to the target directory in each transform operation.
A collection of static documents to be copied over to the target directory in each transform operation.
This is allows for a central collection of CSS, JavaScript, image and other files needed for a specific theme.
Builder API for block parsers.
Extension methods for Typesafe Config instances.
Factory for Typesafe Config instances that add information about the virtual path of the configuration within a Laika document tree.
The default implementations for determining the document type of the input based on its path.
Provides default ExtensionBundle instances.
Utilities for dealing with rewrite rules.
Builder API for span parsers.
API for defining a collection of static documents based on one or more directories.
API for defining a collection of static documents based on one or more directories.
Like with all Laika IO, these may be actual file system directories or virtual in-memory trees of input documents.
Defines a parser for a single kind of block element, like a quoted block or a bullet list for example.
the optional start character (allows performance optimizations when defined)
the parser for the block element after the start character
indicates whether this parser produces child elements by recursively applying the parsers for the host language
indicates whether this parser is responsible for root or nested elements only, or for both
indicates whether the parser should be applied before the base parsers of the host language (high precedence) or after them