we munch whole lines (OM NOM NOM)
we munch whole lines (OM NOM NOM)
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
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.
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.
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.
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.
Parses Markdown Lines.
Parses Markdown Lines. Always succeeds.
Parses a link definition.
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.
Parses any line that does not start with a closing XML element.
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.
Parses link definitions and verbatim xml blocks
(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.
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.
Tokenizes preprocessed lines read from a line reader.
Tokenizes a preprocessed Markdown document.
Tokenizes a whole Markdown document.
Parses first level line tokens, i.
Parses first level line tokens, i.e. Markdown lines, XML chunks and link definitions.
Very dumb parser for XML chunks.
Parses a line beginning with a closing XML tag.
The start of a verbatim XML chunk: any line starting directly with an XML element
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
Chops the input into lines and turns those lines into line tokens. Also takes care of preprocessing link definitions and xml blocks.