package std
- Alphabetic
- Public
- All
Type Members
-
class
StandardBlockDirectives extends AnyRef
Defines all supported standard block directives of the reStructuredText reference parser.
Defines all supported standard block directives of the reStructuredText reference parser.
The following directives are fully supported:
compoundcontaineradmonitionattentioncautiondangererrorhintimportantnotetipwarningtopicsidebarrubricepigraphhighlightspull-quoteparsed-literaltablecontentssectnumfigureimageheaderfootertitlemeta
The following directives are supported with some limitations:
codedoes currently not support syntax highlighting (it allows to set the language so client-side highlighters can be integrated if required)sectnumdoes currently not support theprefix,suffixandstartoptions.rawdoes not support thefileorurloptions.includedoes not support any of the options apart from the filename. See the API entry for this directive for details.
Finally, for some directives there is currently no support planned:
math(would require external tools)csv-table,list-table(would just require some work, contributions are welcome)target-notes,class(these would require processing beyond the directive itself, therefore would require new API)
-
class
StandardSpanDirectives extends AnyRef
Defines all supported standard span directives of the reStructuredText reference parser.
Defines all supported standard span directives of the reStructuredText reference parser. A span directive can be used in substitution definitions.
The
replacedirective is fully supported. The other directives have the following adjustments or limitations compared to their counterparts in the reference parser:unicode: does not support the various trim options, as that would require modifying adjacent elements (and no other directive has this requirement, therefore API/impl changes did not seem justified)date: Uses the patterns ofjava.text.SimpleDateFormatinstead of Python'stime.strftimefunction.image: Does not support the various layout options (width,height,scale,align), as no other tree nodes in Laika carry concrete layout information. It is recommended to use styles instead.
-
class
StandardTextRoles extends AnyRef
Defines all supported standard text roles of the reStructuredText reference parser.
Defines all supported standard text roles of the reStructuredText reference parser.
The following text roles are fully supported:
emphasisstrongliteralsubscript(andsubalias)superscript(andsupalias)title-reference(andtitlealias) - the default roleraw(+ format option) (needs to be enabled explicitly throughReStructuredText.withRawElements)
The following text role is supported with some limitation:
codedoes currently not support syntax highlighting (it allows to set the language so client-side highlighters can be integrated if required)
The following text roles are not supported:
mathpep-referencerfc-reference
In contrast to the reference parser the
default-roledirective cannot be supported in Laika as the parser is not stateful. Therefore it is not possible to change the default role half-way through a parsing process. However the default role can be specified through the API when creating a parser instance:object RstExtensions extends RstExtensionRegistry { val blockDirectives = Nil val spanDirectives = Nil val textRoles = Nil override val defaultTextRole = "my-role-name" } val transformer = Transformer.from(ReStructuredText).to(HTML).using(RstExtensions)
See http://docutils.sourceforge.net/docs/ref/rst/roles.html for details.
Value Members
-
object
StandardDirectiveParsers
Defines the custom argument and body parsers for the standard directives.
Defines the custom argument and body parsers for the standard directives. Most of these delegate to the default block or inline parsers for
reStructuredText, but often do only except one specific block type likeTableorQuotedBlockwhereas the default block parser usually accepts any of the blocks. - object StandardDirectiveParts