An atx style header line.
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.
A parser for the markdown language.
A parser for the markdown language. Works on pre-parsed lines that can be created by a LineParser.
A line indicating a block quote (starts with "> ")
A line in verbatim code or the continuation of a list item
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.
A line consisting only of whitespace.
Starting line of a fenced code block: three backticks followed by an optional language token
Ending line of a fenced code block: three backticks followed by optional whitespace
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.
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.
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.
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.
Definition of a link or url that can be referenced by id.
Stub class that is an intermediate result when parsing link definitions.
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.
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.
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]. ")
Any other line.
A horizontal ruler line.
Represents the underline for a setext style header
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.
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.
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).
A line indicating the start of an unordered list item (starts with " * ")
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.
An atx style header line. Trims hashes automatically and determines the header level from them.