Class

net.liftweb.markdown

LineTokenizer

Related Doc: package markdown

Permalink

class LineTokenizer extends Parsers

Chops the input into lines and turns those lines into line tokens. Also takes care of preprocessing link definitions and xml blocks.

Linear Supertypes
Parsers, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LineTokenizer
  2. Parsers
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LineTokenizer()

    Permalink

Type Members

  1. type Elem = String

    Permalink

    we munch whole lines (OM NOM NOM)

    we munch whole lines (OM NOM NOM)

    Definition Classes
    LineTokenizer → Parsers
  2. case class Error extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  3. case class Failure extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  4. type Input = Reader[Elem]

    Permalink
    Definition Classes
    Parsers
  5. sealed abstract class NoSuccess extends ParseResult[Nothing]

    Permalink
    Definition Classes
    Parsers
  6. trait OnceParser[+T] extends Parser[T]

    Permalink
    Definition Classes
    Parsers
  7. sealed abstract class ParseResult[+T] extends AnyRef

    Permalink
    Definition Classes
    Parsers
  8. abstract class Parser[+T] extends (Input) ⇒ ParseResult[T]

    Permalink
    Definition Classes
    Parsers
  9. case class Success[+T] extends ParseResult[T] with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  10. case class ~[+a, +b] extends Product with Serializable

    Permalink
    Definition Classes
    Parsers

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

    Permalink
    Definition Classes
    Parsers
  5. def Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  6. def accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  7. def accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  8. implicit def accept(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  9. def acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  10. def acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  11. def acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  12. def allowXmlBlocks: Boolean

    Permalink

    Determines if xml blocks may be included verbatim.

    Determines if xml blocks may be included verbatim. If true, they are passed through, else they are escaped and turned into paragraphs

  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  15. def chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  16. def chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]

    Permalink
    Definition Classes
    Parsers
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def commit[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  19. def elem(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  20. def elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  23. def err(msg: String): Parser[Nothing]

    Permalink
    Definition Classes
    Parsers
  24. def failure(msg: String): Parser[Nothing]

    Permalink
    Definition Classes
    Parsers
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def firstChar(line: String): Char

    Permalink

    Returns the first char in the given string or a newline if the string is empty.

    Returns the first char in the given string or a newline if the string is empty. This is done to speed up header parsing. Used to speed up line tokenizing substantially by using the first char in a line as lookahead for which parsers to even try.

  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def guard[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. def indicatorChar(line: String): Char

    Permalink

    Finds the char in the given line that is the best indication of what kind of markdown line this is.

    Finds the char in the given line that is the best indication of what kind of markdown line this is. The “special” Markdown lines all start with up to three spaces. Those are skipped if present. The first char after those (up to)three spaces or a newline is returned.

  31. def innerTokenize(lines: List[String], lookup: Map[String, LinkDefinition]): MarkdownLineReader

    Permalink

    Turns a list of inner lines (the payloads of the lines making up the block) into line tokens.

    Turns a list of inner lines (the payloads of the lines making up the block) into line tokens. Does not check for XML chunks or link definitions.

  32. def innerTokens(lookup: Map[String, LinkDefinition]): Parser[MarkdownLineReader]

    Permalink

    Parses tokens that may occur inside a block.

    Parses tokens that may occur inside a block. Works like the normal token parser except that it does not check for link definitions and verbatim XML.

  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. object lineParsers extends LineParsers

    Permalink
  35. def lineToken: Parser[MarkdownLine]

    Permalink

    Parses Markdown Lines.

    Parses Markdown Lines. Always succeeds.

  36. def linkDefinition: Parser[LinkDefinition]

    Permalink

    Parses a link definition.

  37. def log[T](p: ⇒ Parser[T])(name: String): Parser[T]

    Permalink
    Definition Classes
    Parsers
  38. def maybeUrlInNextLine(prev: (LinkDefinitionStart, Option[String])): Parser[LinkDefinition]

    Permalink

    Tries to parse an URL from the next line if necessary.

    Tries to parse an URL from the next line if necessary. The passed tuple is the result from a previous parser and used to decide how to continue parsing.

  39. def mkList[T]: (~[T, List[T]]) ⇒ List[T]

    Permalink
    Definition Classes
    Parsers
  40. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  41. def not[T](p: ⇒ Parser[T]): Parser[Unit]

    Permalink
    Definition Classes
    Parsers
  42. def notXmlChunkEnd: Parser[String]

    Permalink

    Parses any line that does not start with a closing XML element.

  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. def opt[T](p: ⇒ Parser[T]): Parser[Option[T]]

    Permalink
    Definition Classes
    Parsers
  46. def p[T](parser: lineParsers.Parser[T]): Parser[T]

    Permalink

    Returns a parser based on the given line parser.

    Returns a parser based on the given line parser. The resulting parser succeeds if the given line parser consumes the whole String.

  47. def phrase[T](p: Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  48. def positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  49. def preprocessToken: Parser[Product with Serializable]

    Permalink

    Parses link definitions and verbatim xml blocks

  50. def rep[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  51. def rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    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.

  52. def rep1[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  53. def rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  54. def repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  55. def repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  56. def splitLines(s: String): List[String]

    Permalink

    Simple preprocessing: split the input at each newline.

    Simple preprocessing: split the input at each newline. These whole lines are then fed to the actual Tokenizer.

  57. def success[T](v: T): Parser[T]

    Permalink
    Definition Classes
    Parsers
  58. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  59. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  60. def tokenize(lines: Reader[String]): MarkdownLineReader

    Permalink

    Tokenizes preprocessed lines read from a line reader.

  61. def tokenize(lines: List[String]): MarkdownLineReader

    Permalink

    Tokenizes a preprocessed Markdown document.

  62. def tokenize(s: String): MarkdownLineReader

    Permalink

    Tokenizes a whole Markdown document.

  63. def tokens: Parser[MarkdownLineReader]

    Permalink

    Parses first level line tokens, i.e.

    Parses first level line tokens, i.e. Markdown lines, XML chunks and link definitions.

  64. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. def xmlChunk: Parser[XmlChunk]

    Permalink

    Very dumb parser for XML chunks.

  68. def xmlChunkEnd: Parser[String]

    Permalink

    Parses a line beginning with a closing XML tag.

  69. def xmlChunkStart: Parser[String]

    Permalink

    The start of a verbatim XML chunk: any line starting directly with an XML element

Inherited from Parsers

Inherited from AnyRef

Inherited from Any

Ungrouped