pub enum Rule {
Show 24 variants
EOI,
WHITESPACE,
document,
block,
header,
unordered_list,
ordered_list,
paragraph,
paragraph_line,
unordered_list_point,
ordered_list_point,
line_content,
bold_italic,
bold,
italic,
not_bold_italic_char,
not_bold_char,
not_italic_char,
char,
header_start,
unordered_start,
ordered_start,
digit,
new_line,
}Variants§
EOI
End-of-input
WHITESPACE
Match one whitespace characters (space or tab).
document
A document consists of zero or more blocks from the Start of Input (SOI) to the End of Input (EOI).
block
A block is a main structural element. It can be a header, a list, or a paragraph.
header
Match a header line. Consists of a header start, content and a new line.
unordered_list
Match an unordered list, which consists of one or more list points.
ordered_list
Match an ordered list, which consists of one or more numbered list points.
paragraph
Match a paragraph, which onsists of one or more lines of text.
paragraph_line
A line of a paragraph, which does not start as a header or list.
unordered_list_point
A point in an unordered list. Consists of an unordered start, content and a new line.
ordered_list_point
A point in an ordered list. Consists of an ordered start, content and a new line.
line_content
The content of a line, which can contain bold, italic or bold italic text, as well as plain characters and whitespace.
bold_italic
Match bold and italic text(triple asterisks).
bold
Match bold text (double asterisks).
italic
Match italic text (single asterisk).
not_bold_italic_char
Match characters that can appear inside bold italic text, not “***” or newlines.
not_bold_char
Match characters that can appear inside bold text, not “**” or newlines.
not_italic_char
Match characters that can appear inside italic text, not “*” or newlines.
char
Match any character except newline. Basic building block for text content.
header_start
Match the start of a header line. Consists of 1 to 6 hash symbols, not followed by another hash and a space/end.
unordered_start
Match the start of an unordered list point. Can be a dash or asterisk followed by a space.
ordered_start
Match the start of an ordered list point. Consists of one or more digits followed by a period and space.
digit
Match a digit character (0-9).
new_line
Match a newline character in either windows (\r\n) or unix (\n) format.