case object Markdown extends MarkupFormat with Product with Serializable
A parser for Markdown text. Instances of this class may be passed directly
to the Parser
or Transformer
APIs:
val document = MarkupParser.of(Markdown).build.parse(inputString)
Transformer.from(Markdown).to(HTML).build.transform(inputString)
Since this library is not solely focused on producing HTML output, parsing verbatim HTML elements like defined by the official Markdown syntax description is an optional feature, as some types of renderers would not know what to do with HTML nodes in the document tree. It must be enabled explicitly:
val parser = MarkupParser.of(Markdown).withRawContent.build
To switch off all custom extensions like directives, configuration sections at the start of the document or automatic id generation for headers, you can run the parser in strict mode:
val transformer = Transformer.from(Markdown).to(HTML).strict
- Alphabetic
- By Inheritance
- Markdown
- Serializable
- Product
- Equals
- MarkupFormat
- Format
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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
- Markdown → MarkupFormat
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- Markdown → MarkupFormat
- def 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
- Format
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
- Markdown → MarkupFormat
- 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
- Markdown → MarkupFormat
- 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
- Markdown → MarkupFormat
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- 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
- Markdown → MarkupFormat
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()