package markdown
- Alphabetic
- Public
- All
Type Members
-
case class
AtxHeaderLine
(pre: String, pay: String) extends MarkdownLine with Product with Serializable
An atx style header line.
An atx style header line. Trims hashes automatically and determines the header level from them.
-
trait
BaseParsers
extends RegexParsers
Basic parsers for Markdown Source.
Basic parsers for Markdown Source. Provides general, small parsers that are used by other parsers. Also contains parsers for XML elements.
-
trait
BlockParsers
extends Parsers
A parser for the markdown language.
A parser for the markdown language. Works on pre-parsed lines that can be created by a LineParser.
-
case class
BlockQuoteLine
(pre: String, pay: String) extends MarkdownLine with Product with Serializable
A line indicating a block quote (starts with "> ")
-
case class
CodeLine
(pre: String, pay: String) extends MarkdownLine with Product with Serializable
A line in verbatim code or the continuation of a list item
-
trait
Decorator
extends AnyRef
This trait influences the behavior of the Markdown output of inline and block parsers and the complete transformer.
This trait influences the behavior of the Markdown output of inline and block parsers and the complete transformer. Mix in this trait and override methods to change the behavior and override the "deco()" method in the respective parser/transformer to return your modified instances to change the output they create.
Inline element decoration methods always get passed the spanned text, so you have to prepend and append the opening/closing tags. For block elements there is always a method for the opening and closing tags. This is to make block processing more efficient to prevent unnecessary String building of whole blocks just to add tags. (The block building uses a StringBuilder internally and just appends the returned tags)
If you want line breaks after opening/closing block level tags, you have to add the newline yourself.
-
case class
EmptyLine
(content: String) extends MarkdownLine with Product with Serializable
A line consisting only of whitespace.
-
case class
ExtendedFencedCode
(pre: String, pay: String) extends MarkdownLine with Product with Serializable
Starting line of a fenced code block: three backticks followed by an optional language token
-
case class
FencedCode
(pre: String) extends MarkdownLine with Product with Serializable
Ending line of a fenced code block: three backticks followed by optional whitespace
-
trait
InlineParsers
extends BaseParsers
A parser for inline markdown, markdown escapes and XML escapes.
A parser for inline markdown, markdown escapes and XML escapes. This is used by the result classes of the block parsers to handle Markdown within a block.
-
trait
LineParsers
extends InlineParsers
Parses single lines into tokens.
Parses single lines into tokens. Markdown lines are differentiated by their beginning. These lines are then organized in blocks by the BlockParsers.
-
case class
LineReader
extends Reader[String] with Product with Serializable
A Reader for reading whole Strings as tokens.
A Reader for reading whole Strings as tokens. Used by the Tokenizer to parse whole lines as one Element.
-
class
LineTokenizer
extends Parsers
Chops the input into lines and turns those lines into line tokens.
Chops the input into lines and turns those lines into line tokens. Also takes care of preprocessing link definitions and xml blocks.
-
case class
LinkDefinition
(id: String, url: String, title: Option[String]) extends Product with Serializable
Definition of a link or url that can be referenced by id.
-
case class
LinkDefinitionStart
(id: String, url: String) extends Product with Serializable
Stub class that is an intermediate result when parsing link definitions.
-
sealed abstract
class
MarkdownLine
extends AnyRef
Represents a line of markdown.
Represents a line of markdown. The prefix is the beginning of the line that indicates the line type, the payload is the actual content after the prefix.
-
case class
MarkdownLineReader
extends Reader[MarkdownLine] with Product with Serializable
This class allows us to reference a map with link definitions resulting from the line parsing during block parsing.
This class allows us to reference a map with link definitions resulting from the line parsing during block parsing. It extends a Reader for MarkdownLines and allows us to add the said map to the parsing context. This is basically a modification of the parser monad's state.
-
case class
OItemStartLine
(pre: String, pay: String) extends MarkdownLine with Product with Serializable
A line indicating the start of an ordered list item (starts with " [NUMBER].
A line indicating the start of an ordered list item (starts with " [NUMBER]. ")
-
case class
OtherLine
(content: String) extends MarkdownLine with Product with Serializable
Any other line.
-
case class
RulerLine
(content: String) extends MarkdownLine with Product with Serializable
A horizontal ruler line.
-
case class
SetExtHeaderLine
(content: String, headerLevel: Int) extends MarkdownLine with Product with Serializable
Represents the underline for a setext style header
- class SingleThreadedTransformer extends Transformer
-
class
ThreadLocalTransformer
extends Transformer
Simple Standalone Markdown transformer.
Simple Standalone Markdown transformer. Use this if you simply want to transform a block of markdown without any special options. val input:String = ... val xhtml:String = new ActuariusTransformer()(input)
Note that this markdown parser isn't inherently thread-safe, as Scala Parser Combinators aren't, so this class instantiates a SingleThreadedTransformer for each thread. You'll need to write your own pooled implementation if this isn't efficient for your usage.
-
trait
TimedTransformer
extends AnyRef
Quick and dirty test for measuring the time of this Parser.
Quick and dirty test for measuring the time of this Parser. Contains hardcoded file paths, just ignore this, it will be removed soon.
-
trait
Transformer
extends AnyRef
This is the Transformer that uses the other parsers to transform markdown into xhtml.
This is the Transformer that uses the other parsers to transform markdown into xhtml. Mix this trait in if you want more control over the output (like switching verbatim xml on/off or using different opening/closing tags for the output).
-
case class
UItemStartLine
(pre: String, pay: String) extends MarkdownLine with Product with Serializable
A line indicating the start of an unordered list item (starts with " * ")
-
case class
XmlChunk
(content: String) extends MarkdownLine with Product with Serializable
Represents lines of verbatim xml.
Represents lines of verbatim xml. Actually this class is a little cheat, as it represents multiple lines. But it is a token that is created when "parsing with a line scope", so it is not too bad.