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:
compound
container
admonition
attention
caution
danger
error
hint
important
note
tip
warning
topic
sidebar
rubric
epigraph
highlights
pull-quote
parsed-literal
table
contents
sectnum
figure
image
header
footer
title
meta
The following directives are supported with some limitations:
code
does currently not support syntax highlighting (it allows to set the language so client-side highlighters can be integrated if required)sectnum
does currently not support theprefix
,suffix
andstart
options.raw
does not support thefile
orurl
options.include
does 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
replace
directive 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.SimpleDateFormat
instead of Python'stime.strftime
function.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:
emphasis
strong
literal
subscript
(andsub
alias)superscript
(andsup
alias)title-reference
(andtitle
alias) - the default roleraw
(+ format option) (needs to be enabled explicitly throughReStructuredText.withRawElements
)
The following text role is supported with some limitation:
code
does 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:
math
pep-reference
rfc-reference
In contrast to the reference parser the
default-role
directive 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 likeTable
orQuotedBlock
whereas the default block parser usually accepts any of the blocks. - object StandardDirectiveParts