Markdown

case object Markdown extends MarkupFormat

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
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Format
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels = EmptyTuple
Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple
Inherited from:
Singleton
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror
type MirroredMonoType = Singleton
Inherited from:
Singleton
type MirroredType = Singleton
Inherited from:
Singleton

Value members

Concrete methods

override def createBlockListParser(parser: Parser[Block]): Parser[Seq[Block]]
Definition Classes

Inherited methods

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.

Inherited from:
Format
def fromProduct(p: Product): MirroredMonoType
Inherited from:
Singleton
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

lazy override val escapedChar: Parser[String]
val fileSuffixes: Set[String]