trait BlockParsers extends Parsers
A parser for the markdown language. Works on pre-parsed lines that can be created by a LineParser.
- Alphabetic
- By Inheritance
- BlockParsers
- Parsers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
Blockquote
extends MarkdownBlock
Represents a quoted text block.
Represents a quoted text block. Text in the block is recursively evaluated.
-
class
CodeBlock
extends MarkdownBlock
Represents a block of verbatim qouted code
-
type
Elem = MarkdownLine
- Definition Classes
- BlockParsers → Parsers
-
case class
Error extends NoSuccess with Product with Serializable
- Definition Classes
- Parsers
-
case class
Failure extends NoSuccess with Product with Serializable
- Definition Classes
- Parsers
- class FencedCodeBlock extends MarkdownBlock
-
case class
Header
(content: String, headerLevel: Int, lookup: Map[String, LinkDefinition]) extends MarkdownBlock with Product with Serializable
Represents a header
-
type
Input = Reader[Elem]
- Definition Classes
- Parsers
-
abstract
class
ListBlock
extends MarkdownBlock
Base class for ordered and unordered lists, allows for correct handling of paragraphs in lists.
-
class
ListItem
extends LineParsers
Helper class to build lists.
Helper class to build lists. Allows easy checking if an item ends with empty lines and recursively builds the content of an item.
-
sealed abstract
class
MarkdownBlock
extends InlineParsers
A markdown block element.
-
sealed abstract
class
NoSuccess extends ParseResult[Nothing]
- Definition Classes
- Parsers
-
class
OList
extends ListBlock
An ordered (i.e.
An ordered (i.e. numbered) list of items.
-
trait
OnceParser[+T] extends Parser[T]
- Definition Classes
- Parsers
-
class
Paragraph
extends MarkdownBlock
Represents a paragraph of text
-
sealed abstract
class
ParseResult[+T] extends AnyRef
- Definition Classes
- Parsers
-
abstract
class
Parser[+T] extends (Input) ⇒ ParseResult[T]
- Definition Classes
- Parsers
-
case class
Success[+T] extends ParseResult[T] with Product with Serializable
- Definition Classes
- Parsers
-
class
UList
extends ListBlock
An unordered list of items.
-
class
VerbatimXml
extends MarkdownBlock
:? Represents a block of verbatim xml
-
case class
~[+a, +b] extends Product with Serializable
- Definition Classes
- Parsers
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
-
def
OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]
- Definition Classes
- Parsers
-
def
Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]
- Definition Classes
- Parsers
-
def
accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]
- Definition Classes
- Parsers
-
def
accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]
- Definition Classes
- Parsers
-
implicit
def
accept(e: Elem): Parser[Elem]
- Definition Classes
- Parsers
-
def
acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]
- Definition Classes
- Parsers
-
def
acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]
- Definition Classes
- Parsers
-
def
acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]
- Definition Classes
- Parsers
-
def
anyLine: Parser[MarkdownLine]
Parses any line.
-
def
apply(in: MarkdownLineReader): String
Parses the given input as a markdown document and returns the string result
-
def
apply[T](p: Parser[T], list: List[MarkdownLine]): T
Generic apply method to test a single parser
-
def
apply[T](p: Parser[T], in: MarkdownLineReader): T
Generic apply method to run one of our pasers on the given input.
-
def
applyBlocks(in: MarkdownLineReader): List[MarkdownBlock]
parses all blocks from the given reader
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atxHeader: Parser[Header]
-
def
blockquote: Parser[Blockquote]
Parses a quoted block.
Parses a quoted block. A quoted block starts with a line starting with "> " followed by more blockquote lines, paragraph lines following blockqoute lines and may be interspersed with empty lines
-
def
blockquoteFragment: Parser[List[MarkdownLine]]
Parses a blockquote fragment: a block starting with a blockquote line followed by more blockquote or paragraph lines, ends optionally with empty lines
-
def
chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]
- Definition Classes
- Parsers
-
def
chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]
- Definition Classes
- Parsers
-
def
chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]
- Definition Classes
- Parsers
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
codeBlock: Parser[CodeBlock]
parses a code block
-
def
commit[T](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
deco(): Decorator
Used to define the output format of parsed blocks and whether verbatim xml blocks are allowed.
-
def
elem(e: Elem): Parser[Elem]
- Definition Classes
- Parsers
-
def
elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]
- Definition Classes
- Parsers
- def emptyLine: Parser[EmptyLine]
-
def
emptyLines: Parser[List[MarkdownLine]]
accepts one or more empty lines
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
err(msg: String): Parser[Nothing]
- Definition Classes
- Parsers
-
def
failure(msg: String): Parser[Nothing]
- Definition Classes
- Parsers
-
def
fastBlock: Parser[MarkdownBlock]
speed up block processing by looking ahead
-
def
fencedCodeBlock: Parser[FencedCodeBlock]
Parses a fenced code block: a line starting a fenced code block with "
", followed by any lines that do not stop it, optionally followed by the ending line. Optionally parsing the stopping line causes the code block to extend to the end of the document. (This is the github behavior, where omitting the line closing the code block causes the block to extend to the end of the document as well)
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
guard[T](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
indent(level: Int): String
returns the current indentation string repeated the given number of levels
-
def
innerBlock: Parser[MarkdownBlock]
parses inner blocks (everything excluding xml)
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
itemContinuation: Parser[List[MarkdownLine]]
The continuation of a list item: A line indented by four spaces or a tab (a continuation line), followed by more continuation or paragraph lines followed by empty lines
-
def
itemLines: Parser[List[MarkdownLine]]
parses a list of lines that may make up the body of a list item
-
def
line[T](c: Class[T]): Parser[T]
Parses a line of the given type T
-
def
log[T](p: ⇒ Parser[T])(name: String): Parser[T]
- Definition Classes
- Parsers
-
def
lookup: Parser[Map[String, LinkDefinition]]
returns the current link lookup from the reader always succeeds, never consumes input
-
def
markdown: Parser[List[MarkdownBlock]]
a markdown parser
-
def
mkList[T]: (~[T, List[T]]) ⇒ List[T]
- Definition Classes
- Parsers
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
not[T](p: ⇒ Parser[T]): Parser[Unit]
- Definition Classes
- Parsers
-
def
notLine[T](c: Class[T]): Parser[MarkdownLine]
Parses a line of any type *but* T
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
oItem: Parser[ListItem]
parses an item in a sorted list
-
def
oList: Parser[OList]
parses an ordered list
-
def
opt[T](p: ⇒ Parser[T]): Parser[Option[T]]
- Definition Classes
- Parsers
-
def
optEmptyLines: Parser[List[MarkdownLine]]
accepts zero or more empty lines
-
def
outerBlock: Parser[MarkdownBlock]
parses first level blocks (all blocks, including xml)
-
def
paragraph: Parser[Paragraph]
a consecutive block of paragraph lines returns the content of the matched block wrapped in
a consecutive block of paragraph lines returns the content of the matched block wrapped in
tags
-
def
phrase[T](p: Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]
- Definition Classes
- Parsers
-
def
rep[T](p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The
p0
call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
def
rep1[T](p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]
- Definition Classes
- Parsers
-
def
ruler: Parser[MarkdownBlock]
parses a horizontal ruler
- def setExtHeader: Parser[Header]
-
def
success[T](v: T): Parser[T]
- Definition Classes
- Parsers
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
uItem: Parser[ListItem]
parses an item in an unsorted list
-
def
uList: Parser[UList]
parses an unordered list
-
def
verbatimXml: Parser[VerbatimXml]
parses a verbatim xml block
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
Ruler
extends MarkdownBlock
Represents a horizontal ruler