laika.parse.rst

ReStructuredText

object ReStructuredText extends ReStructuredText

The default reStructuredText parser configuration, without any directives or text roles installed.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ReStructuredText
  2. ReStructuredText
  3. ParserFactory
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. 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 consired.

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

    Definition Classes
    ReStructuredTextParserFactory
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. val newParser: (Input) ⇒ Document

    The actual parser function, fully parsing the specified input and returning a document tree.

    The actual parser function, fully parsing the specified input and returning a document tree.

    Definition Classes
    ReStructuredTextParserFactory
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def strict: ReStructuredText

    Turns strict mode on for the returned parser, switching off any features not part of the reStructuredText specification.

    Turns strict mode on for the returned parser, switching off any features not part of the reStructuredText specification. This includes the Laika variant of directives as well as configuration sections at the start of the document.

    Definition Classes
    ReStructuredText
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  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( ... )
  25. def withBlockDirectives(directives: Directive[Block]*): ReStructuredText

    Adds the specified directives and returns a new instance of the parser.

    Adds the specified directives and returns a new instance of the parser. These block directives may then be used anywhere in documents parsed by this instance.

    Example:

    case class Note (title: String, content: Seq[Block]) extends Block with BlockContainer[Note]
    
    val rst = ReStructuredText withBlockDirectives (
      BlockDirective("note") {
        (argument() ~ blockContent)(Note)
      }
    )
    
    Transform from rst to HTML fromFile "hello.rst" toFile "hello.html"

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

    Definition Classes
    ReStructuredText
  26. def withDefaultTextRole(role: String): ReStructuredText

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

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

    Definition Classes
    ReStructuredText
  27. def withLaikaBlockDirectives(directives: directive.Directives.Blocks.Directive*): ReStructuredText

    Adds the specified Laika directives and returns a new instance of the parser.

    Adds the specified Laika directives and returns a new instance of the parser.

    Example:

    case class Note (title: String, content: Seq[Block], options: Options = NoOpt)
                                                         extends Block with BlockContainer[Note]
    
    val rst = ReStructuredText withLaikaBlockDirectives (
      Blocks.create("note") {
        (attribute(Default) ~ body(Default))(Note(_,_))
      }
    )
    Transform from rst to HTML fromFile "hello.rst" toFile "hello.html"

    For more details on implementing Laika directives see laika.directives.Directives.

    Definition Classes
    ReStructuredText
  28. def withLaikaSpanDirectives(directives: directive.Directives.Spans.Directive*): ReStructuredText

    Adds the specified Laika directives and returns a new instance of the parser.

    Adds the specified Laika directives and returns a new instance of the parser.

    Example:

    val rst = ReStructuredText withLaikaSpanDirectives (
      Spans.create("ticket") {
        (attribute(Default) ~ attribute("param").optional) { (ticketNo, param) =>
          val base = "http://tickets.service.com/"+ticketNo
          val url = base + (param map (p => "¶m="+p) getOrElse "")
          ExternalLink(Seq(Text("Ticket "+ticketNo)), url, options = Styles("ticket"))
        }
      }
    )
    
    Transform from rst to HTML fromFile "hello.rst" toFile "hello.html"

    For more details on implementing Laika directives see laika.directives.Directives.

    Definition Classes
    ReStructuredText
  29. def withRawContent: ReStructuredText

    Adds the raw directive and text roles to the parser.

    Adds the raw directive and text roles to the parser. These are disabled by default as they present a potential security risk.

    Definition Classes
    ReStructuredText
  30. def withSpanDirectives(directives: Directive[Span]*): ReStructuredText

    Adds the specified directives and returns a new instance of the parser.

    Adds the specified directives and returns a new instance of the parser. These span directives can then be referred to by substitution references.

    Example:

    val rst = ReStructuredText withSpanDirectives (
      SpanDirective("replace") {
        spanContent map SpanSequence
      }
    )
    
    Transform from rst to HTML fromFile "hello.rst" toFile "hello.html"

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

    Definition Classes
    ReStructuredText
  31. def withTextRoles(roles: TextRole*): ReStructuredText

    Adds the specified text roles and returns a new instance of the parser.

    Adds the specified text roles and returns a new instance of the parser. These text roles may then be used in interpreted text spans.

    Example:

    val rst = ReStructuredText withTextRoles (
      TextRole("link", "http://www.our-server.com/tickets/")(field("base-url")) {
        (base, text) => Link(List(Text(text)), base + text)
      }
    )
    
    Transform from rst to HTML fromFile "hello.rst" toFile "hello.html"

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

    Definition Classes
    ReStructuredText

Inherited from ReStructuredText

Inherited from ParserFactory

Inherited from AnyRef

Inherited from Any

Ungrouped