Succeeds if the given parsers succeeds and the given function is defined at the parse result.
Succeeds if the given parsers succeeds and the given function is defined at the parse result. Returns the result of the method applied to the given parsers result.
Matches exactly one char, no matter which.
Matches exactly one char, no matter which. This differs from "elem" as it returns a string consisting of that char.
Runs the given parser on the given input.
Runs the given parser on the given input. Expects the parser to succeed and consume all input. Throws an IllegalArgumentException if parsing failed.
Either returns the XML escape sequence for the given char or null.
Either returns the XML escape sequence for the given char or null. This does not return Option[String] on purpose. While Option[String] would be a much cleaner solution, this is actually called so often that it is a noticeable difference if we use Option here.
Escapes the given char for XML.
Escapes the given char for XML. Returns Either the necessary XML escape Sequence or the same char in a String.
Looks if the preceding char was one of the given chars.
Looks if the preceding char was one of the given chars. Never consumes any input.
Accepts a unix newline and returns a string containing a single newline.
Matches one of the given char keys in the map.
Matches one of the given char keys in the map. Returns the string value for the matched char in the given map.
Matches one of the chars in the given set.
Matches one of the chars in the given set. Returns a string with the matched char.
accepts zero or more spaces or tabs returns the matched whitespace
Matches one char in the given range, returns the matched char.
(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.
Matches everything in the parsed string up to the end.
Matches everything in the parsed string up to the end. Also matches the empty String. Returns the matched String.
Whitespace is sometimes important in markdown parsing, we handle it manually.
Whitespace is sometimes important in markdown parsing, we handle it manually. So this returns false.
Returns a verbose description of a char (printed char & hex code).
Returns a verbose description of a char (printed char & hex code). Used for debugging.
accepts one or more spaces or tabs returns the matched whitespace
Parses an XML Attribute with simplified value handling like xmlAttrVal.
Parses a Simplified xml attribute: everything between quotes ("foo") everything between the quotes is run through the escape handling That way you can omit xml escaping when writing inline XML in markdown.
Parses closing xml tags.
Parses an XML name (tag or attribute name)
Parses an XML name char according to W3C spec except that range #x10000 to #xEFFFF is excluded
Parser for one char that starts an XML name.
Parser for one char that starts an XML name. According to W3C specs except that range #x10000 to #xEFFFF is excluded (cannot be expressed by char literals)
Parses an xml start or empty tag, attribute values are escaped.
(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
Basic parsers for Markdown Source. Provides general, small parsers that are used by other parsers. Also contains parsers for XML elements.