Module rustla::parser::state_machine::inline [−][src]
A submodule related to parsing blocks of text for inline elements.
Inline markup recognition rules
Inline markup start-strings and end-strings are only recognized if the following conditions are met:
- Inline markup start-strings must be immediately followed by non-whitespace.
- Inline markup end-strings must be immediately preceded by non-whitespace.
- The inline markup end-string must be separated by at least one character from the start-string.
- Both, inline markup start-string and end-string must not be preceded by an unescaped backslash (except for the end-string of inline literals). See Escaping Mechanism above for details.
- If an inline markup start-string is immediately preceded by one of the ASCII characters ’ “ < ( [ { or a similar non-ASCII character, it must not be followed by the corresponding closing character from ’ “ ) ] } > or a similar non-ASCII character. (For quotes, matching characters can be any of the quotation marks in international usage.)
If the configuration setting simple-inline-markup is False (default), additional conditions apply to the characters “around” the inline markup:
-
Inline markup start-strings must start a text block or be immediately preceded by
- whitespace,
- one of the ASCII characters - : / ’ “ < ( [ {
- or a similar non-ASCII punctuation character.
-
Inline markup end-strings must end a text block or be immediately followed by
- whitespace,
- one of the ASCII characters - . , : ; ! ? \ / ’ “ ) ] } >
- or a similar non-ASCII punctuation character.
Copyright © 2020 Santtu Söderholm
Functions
citation_ref | Parses citation references. |
footnote_ref | Parses footnote references. |
inline_target | Parses inline reference targets. These do not actually create new nodes, but push new labels into the doctree’s inline target stack. |
interpreted_text | |
paired_delimiter | Parses inline text elements that have identical opening
and closing delimiters such as |
phrase_ref | Parses phrase references. |
simple_ref | Parses simple hyperlink references. |
substitution_ref | Parses inline subsitution references. Also adds hyperlink information to the reference,
if the matched string ended with a |
text | This function is invoked when no other inline pattern matched. Eats up any consequent non-whitespace characters as a single word of “text”. |
uri | Parses inline URIs. These are split into general URIs and standalone email addresses.
These two are differentiate by whether the URI starts with a protocol scheme,
such as |
whitespace | Parses inline whitespace. |