Packages

o

laika.format

ReStructuredText

object ReStructuredText extends MarkupFormat with Product with Serializable

A parser for text written in reStructuredText markup. Instances of this class may be passed directly to the Parseer or Transformer APIs:

val document = MarkupParser.of(ReStructuredText).build.parse(inputString)

Transformer.from(ReStructuredText).to(HTML).build.transform(inputString)

reStructuredText has several types of extension points that are fully supported by Laika. For more information on how to implement and register those see laika.rst.bundle.RstExtensionRegistry.

In addition to the standard reStructuredText directives, the API also supports a custom directive type unique to Laika. They represent a library-wide extension mechanism and allow you to implement tags which can be used in any of the supported markup formats or in templates. If you need this level of flexibility, it is recommended to use the Laika directives, if you want to stay compatible with the reStructuredText reference parser, you should pick the standard directives.

Laika directives can be registered with the laika.directive.DirectiveRegistry extension bundle. The DSLs for creating directives are similar, but still different, due to differences in the feature set of the two variants. The Laika directives try to avoid some of the unnecessary complexities of reStructuredText directives.

Linear Supertypes
Serializable, Serializable, Product, Equals, MarkupFormat, Format, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReStructuredText
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. MarkupFormat
  7. Format
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val blockParsers: Seq[BlockParserBuilder]

    All block parsers for the markup language this parser processes.

    All block parsers for the markup language this parser processes.

    Definition Classes
    ReStructuredTextMarkupFormat
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def createBlockListParser(parser: Parser[Block]): Parser[Seq[Block]]

    Creates the parser for a sequence of blocks based on the parser for a single block.

    Creates the parser for a sequence of blocks based on the parser for a single block.

    The parser for a single block is already the result of merging all block parsers defined within this instance with all extension parsers defined by the user.

    The default implementation simply applies this parser repeatedly while skipping blank lines between the parsed blocks. This method can get overridden for special requirements, for example when the previous result has an influence on which parser to pick for the subsequent block.

    Definition Classes
    ReStructuredTextMarkupFormat
  8. val description: String

    Short string describing the markup or output format for tooling and logging.

    Short string describing the markup or output format for tooling and logging.

    Definition Classes
    ReStructuredTextFormat
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. lazy val escapedChar: Parser[String]

    Parses the character after the one that started the escape sequence (usually a backslash).

    Parses the character after the one that started the escape sequence (usually a backslash).

    The default implementation parses any character as is, this can be overridden in case the host language has more specific rules for escape sequences.

    Definition Classes
    ReStructuredTextMarkupFormat
  12. val extensions: Seq[ExtensionBundle]

    The parser-specific extensions that need to be installed for each transformation that involves this parser.

    The parser-specific extensions that need to be installed for each transformation that involves this parser.

    One scenario where a parser needs to provide a bundle is when it produces tree elements that are unknown to the built-in rewrite rules and renderers.

    Definition Classes
    ReStructuredTextMarkupFormat
  13. val fileSuffixes: Set[String]

    The file suffixes recognized by this parser.

    The file suffixes recognized by this parser. When transforming entire directories only files with names ending in one of the specified suffixes will be considered.

    It is recommended not to support txt or similarly common suffixes as this might interfere with other installed formats.

    Definition Classes
    ReStructuredTextMarkupFormat
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. val spanParsers: Seq[SpanParserBuilder]

    All span parsers for the markup language this parser processes.

    All span parsers for the markup language this parser processes.

    Definition Classes
    ReStructuredTextMarkupFormat
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  25. object BundledDefaults extends ExtensionBundle

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from MarkupFormat

Inherited from Format

Inherited from AnyRef

Inherited from Any

Ungrouped