package bundle
- Alphabetic
- Public
- All
Type Members
-
class
ExtendedHTMLRenderer extends AnyRef
HTML renderer for special reStructuredText tree elements not part of the default document tree model.
HTML renderer for special reStructuredText tree elements not part of the default document tree model.
The following tree elements are specific to reStructuredText and are not included in the default model:
FieldList
and corresponding child elementsOptionList
and corresponding child elementsDoctestBlock
FieldLists being part of a directive declaration will be processed by the default parser, the
FieldList
element only appears in the final document model if field lists are used outside of directives. -
class
RewriteRules extends RewriteRulesBuilder
The default rewrite rules that get applied to the raw document tree after parsing reStructuredText markup.
The default rewrite rules that get applied to the raw document tree after parsing reStructuredText markup. These rules are responsible for resolving substitution references and interpreted text which are specific to reStructuredText and get usually executed alongside the generic rules. .
-
trait
RstExtension[P] extends AnyRef
Common base trait for reStructuredText extensions (directives and text roles).
-
trait
RstExtensionRegistry extends ExtensionBundle
Registry for custom reStructuredText extensions.
Registry for custom reStructuredText extensions. Application code can define any number of instances mixing in this trait and then pass them to Parse, Render or Transform operations:
object MyExtensions extends RstExtensionRegistry { val spanDirectives = Seq(...) val blockDirectives = Seq(...) val textRoles = Seq(...) } object OtherExtensions extends RstExtensionRegistry { [...] } val transformer = Transformer .from(ReStructuredText) .to(HTML) .using(MyDirectives, OtherDirectives) .build
In contrast to the original Python implementation, this API has been redesigned to be a more idiomatic, concise and type-safe Scala DSL. See the documentation for the methods of this trait for concrete examples on how to implement an extension.
The following extension types are available:
- Block Directives - an extension hook for adding new block level elements to
reStructuredText markup. Use the
blockDirectives
method of this class to add directive implementations to the parser. Specification entry: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#directives - Substitution Definitions - an extension hook for adding new span level elements to
reStructuredText markup that can be used by substitution references (like
|subst|
). Use thespanDirectives
method of this class to add directive implementations to the parser that can be used as substitution definitions. Specification entry: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions - Interpreted Text Roles - an extension hook for adding new dynamic span level elements to
reStructuredText markup. In contrast to substitution definitions the implementation of a text
role uses the text from the occurrences in the markup referring to the role as input.
Use the
textRoles
method of this class to add custom text role implementations to the parser that can be referred to by interpreted text. Specification entry: http://docutils.sourceforge.net/docs/ref/rst/directives.html#custom-interpreted-text-roles
- Block Directives - an extension hook for adding new block level elements to
reStructuredText markup. Use the
-
class
RstExtensionSupport extends ExtensionBundle
Internal API that processes all extensions defined by one or more RstExtensionRegistries.
Internal API that processes all extensions defined by one or more RstExtensionRegistries. This extension is installed by default when using the reStructuredText parser.
Value Members
-
object
DocInfoExtractor extends (UnresolvedDocument) ⇒ UnresolvedDocument
Responsible for extracting a docInfo block at the start of a reStructuredText document and inserting it into the
docInfo
element in the config object for that document.Responsible for extracting a docInfo block at the start of a reStructuredText document and inserting it into the
docInfo
element in the config object for that document.See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#bibliographic-fields.
- object ExtendedHTMLRenderer extends ExtendedHTMLRenderer
-
object
LinkTargetProcessor extends (Seq[Block]) ⇒ Seq[Block]
Processes link targets in a sequence of blocks.
Processes link targets in a sequence of blocks.
In reStructuredText internal link targets provide the id of subsequent block items. This functions gets applied recursively to all block lists.
-
object
RawContentExtensions extends RstExtensionRegistry
Registry for the standard extensions of ReStructuredText which allow for raw content pass-through.
Registry for the standard extensions of ReStructuredText which allow for raw content pass-through. These have to be enabled to call
withRawContent
on theParse
orTransform
APIs:val transformer = Transformer .from(ReStructuredText) .to(HTML) .withRawContent .build
-
object
RstExtension
Companion with utilities for initializing extensions.
-
object
RstExtensionSupport extends RstExtensionSupport
Empty base instance as a basis for registering reStructuredText extensions.
-
object
StandardExtensions extends RstExtensionRegistry
Registry for all standard extensions of ReStructuredText as defined by the specification, except for those which allow for raw content pass-through, which are kept separately in
RawContentExtensions
.Registry for all standard extensions of ReStructuredText as defined by the specification, except for those which allow for raw content pass-through, which are kept separately in
RawContentExtensions
.See http://docutils.sourceforge.net/docs/ref/rst/directives.html for details.
This extension is installed by default when using the reStructuredText parser.