o

laika.rst.bundle

StandardExtensions

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.

See http://docutils.sourceforge.net/docs/ref/rst/directives.html for details.

This extension is installed by default when using the reStructuredText parser.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StandardExtensions
  2. RstExtensionRegistry
  3. ExtensionBundle
  4. AnyRef
  5. 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. def baseConfig: Config

    Base configuration that serves as a fallback for configuration files in the source directories and/or config headers in markup and template documents.

    Base configuration that serves as a fallback for configuration files in the source directories and/or config headers in markup and template documents.

    Definition Classes
    ExtensionBundle
  6. lazy val blockDirectives: List[Directive[Block]]

    Registers the specified block directives.

    Registers the specified block directives.

    Example:

    case class Note (title: String, content: Seq[Block]) extends Block with BlockContainer[Note]
    
    object MyDirectives extends RstExtensionRegistry {
      val blockDirectives = Seq(
        BlockDirective("note") {
          (argument() ~ blockContent).map { case title ~ content => Note(title, content) }
        }
      )
      val spanDirectives = Seq()
      val textRoles = Seq()
    }
    
    val transformer = Transformer
      .from(ReStructuredText)
      .to(HTML)
      .using(MyDirectives)
      .build

    For more details on implementing directives see laika.rst.ext.Directives.

    Definition Classes
    StandardExtensionsRstExtensionRegistry
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. def defaultTextRole: Option[String]

    Overrides the name of the default text role to apply when interpreted text is used in markup without an explicit role name.

    Overrides the name of the default text role to apply when interpreted text is used in markup without an explicit role name.

    Definition Classes
    RstExtensionRegistry
  9. val description: String

    Short string describing the extension for tooling and logging.

    Short string describing the extension for tooling and logging.

    Definition Classes
    StandardExtensionsRstExtensionRegistryExtensionBundle
  10. def docTypeMatcher: PartialFunction[Path, DocumentType]

    Specifies the function to use for determining the document type of the input based on its path.

    Specifies the function to use for determining the document type of the input based on its path.

    Any path for which this function is not defined will be processed by the remaining defined bundles. The documents for paths for which none of the extensions provides a DocumentType will be treated as static files to be copied over to the target directory in transformations by default.

    Definition Classes
    ExtensionBundle
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def extendPathTranslator: PartialFunction[PathTranslatorExtensionContext, PathTranslator]

    Extends the built-in path translator with additional functionality.

    Extends the built-in path translator with additional functionality.

    The internal path translator deals with aspects like applying the suffix for the output format or modifying the path for versioned documents and more.

    The PathTranslatorExtensionContext provides access to this internal path translator, to the output format it is going to be used for and the complete user configuration.

    In most cases, extensions can simply be created by using either PathTranslator.preTranslate or PathTranslator.postTranslate to apply additional translation steps either before or after applying the internal translator.

    Alternatively a completely custom implementation of the PathTranslator trait can be provided, but this will usually not be necessary.

    PathTranslator implementations usually do not deal with the fragment part of the path. Use the slugBuilder extension point for this purpose.

    Definition Classes
    ExtensionBundle
  14. def forStrictMode: Option[ExtensionBundle]

    Provides a version of this bundle that can be used in strict mode or None if the entire bundle should be removed in strict mode.

    Provides a version of this bundle that can be used in strict mode or None if the entire bundle should be removed in strict mode.

    When strict mode does not affect a bundle it can return Some(this).

    Any bundle to be used in strict mode should be free from any parser extensions that adds features to markup syntax beyond their respective specifications.

    Definition Classes
    ExtensionBundle
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. val origin: BundleOrigin

    Indicates whether the bundle is a built-in default provided by the library, a collection of extensions installed by a markup format or user-defined.

    Indicates whether the bundle is a built-in default provided by the library, a collection of extensions installed by a markup format or user-defined.

    This is relevant for determining the precedence of installed bundles when merging them, as user-supplied functionality always overrides library defaults.

    Definition Classes
    StandardExtensionsExtensionBundle
  22. def parsers: ParserBundle

    Specifies extensions and/or replacements for parsers that deal with text markup, templates, CSS or configuration headers.

    Specifies extensions and/or replacements for parsers that deal with text markup, templates, CSS or configuration headers.

    Definition Classes
    ExtensionBundle
  23. def processExtension: PartialFunction[ExtensionBundle, ExtensionBundle]

    Internal API usually only called by other extension bundles.

    Internal API usually only called by other extension bundles.

    In some cases a bundle might be an extension of another bundle and needs the opportunity to process and modify that bundle without requiring a direct reference to it. An example is a registry for directives which needs to pass all its registered directives to the bundle which deals with finally creating all the directive parsers.

    The partial function should match only on the types of bundles it intends to process and is then allowed to return a new, modified instance of that bundle.

    Definition Classes
    RstExtensionRegistryExtensionBundle
  24. def rawContentDisabled: Option[ExtensionBundle]

    Provides a version of this bundle that can be used in the default run mode where raw content in markup documents (such as embedded HTML) is disabled.

    Provides a version of this bundle that can be used in the default run mode where raw content in markup documents (such as embedded HTML) is disabled.

    When a bundle does not add parsers for raw content it can return Some(this).

    Any bundle to be used in the default run mode should be free from any parser extensions that allow raw content in markup. When the user switches the acceptRawContent flag to true then this method will not be invoked and the initial instance of the bundle is used.

    Definition Classes
    ExtensionBundle
  25. def renderOverrides: Seq[RenderOverrides]

    The overrides for renderers defined by this bundle.

    The overrides for renderers defined by this bundle.

    An override is always specific to a particular output format like HTML or PDF. A bundle can contain multiple overrides for the same output format which will be merged before use.

    Definition Classes
    ExtensionBundle
  26. def rewriteRules: RewritePhaseBuilder

    Specifies rewrite rules to be applied to the document tree model between the parse and render operations.

    Specifies rewrite rules to be applied to the document tree model between the parse and render operations.

    The specified functions will be invoked for each document, allowing to capture information from the entire document tree before returning the actual rule, which is a partial function from Element to Option[Element] that allows to remove or replace elements from the tree.

    Definition Classes
    ExtensionBundle
  27. def slugBuilder: Option[(String) ⇒ String]

    Function that receives the text of a headline, the name of a document or directory or a manually assigned identifier, and builds a slug from it that becomes part of the final URL or identifier (depending on output format).

    Function that receives the text of a headline, the name of a document or directory or a manually assigned identifier, and builds a slug from it that becomes part of the final URL or identifier (depending on output format).

    The result of the function must be:

    - a valid identifier in HTML and XML - a valid path segment in a URL - a valid file name

    Definition Classes
    ExtensionBundle
  28. lazy val spanDirectives: List[Directive[Span]]

    Registers the specified span directives.

    Registers the specified span directives. These span directives can then be referred to by substitution references.

    Example:

    object MyDirectives extends RstExtensionRegistry {
      val spanDirectives = Seq(
        SpanDirective("replace") {
          spanContent map SpanSequence
        }
      )
      val blockDirectives = Seq()
      val textRoles = Seq()
    }
    
    val transformer = Transformer
      .from(ReStructuredText)
      .to(HTML)
      .using(MyDirectives)
      .build

    For more details on implementing directives see laika.rst.ext.Directives.

    Definition Classes
    StandardExtensionsRstExtensionRegistry
  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. lazy val textRoles: List[TextRole]

    Registers the specified text roles.

    Registers the specified text roles. These text roles may then be used in interpreted text spans.

    Example:

    val textRole = TextRole("link", "http://www.company.com/main/")(field("base-url")) {
      (base, text) => Link(List(Text(text)), base + text)
    }
    
    object MyDirectives extends RstExtensionRegistry {
      val textRoles = Seq(textRole)
      val spanDirectives = Seq()
      val blockDirectives = Seq()
    }
    
    val transformer = Transformer
      .from(ReStructuredText)
      .to(HTML)
      .using(MyDirectives)
      .build

    For more details on implementing directives see laika.rst.ext.TextRoles.

    Definition Classes
    StandardExtensionsRstExtensionRegistry
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def withBase(base: ExtensionBundle): ExtensionBundle

    Returns a new extension bundle by merging the content of this bundle with the content of the base bundle.

    Returns a new extension bundle by merging the content of this bundle with the content of the base bundle.

    The other bundle is treated as the base of this bundle, which means that:

    - in case of optional features a feature defined in this bundle will overwrite a feature defined in the base

    - in case of features applied in sequence, the features in this bundle will be applied before the features in the base bundle

    - in case of feature collections, the features of this bundle will be merged with those of the base bundle

    Definition Classes
    ExtensionBundle

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from RstExtensionRegistry

Inherited from ExtensionBundle

Inherited from AnyRef

Inherited from Any

Ungrouped