Crate blogs_md_easy

Crate blogs_md_easy 

Source

Structs§

Marker
A position for a Cursor within a Span.
Meta
A simple struct to store the key value pair from within the meta section of a Markdown file.
Placeholder
A Placeholder is a variable that is created within a Template file.
Selection
A helper struct that contains a start and end Marker of a Span.

Enums§

Filter
Predefined functions names that will be used within render_filter to convert a value.
TextCase
A list of all the available text case Filters.

Functions§

create_variables
Creates a HashMap of key-value pairs from meta values.
is_alphabetic
Rewrite of the nom::is_alphabetic function that takes a char instead.
is_filter_arg
A function that checks if a character is valid for a filter argument name.
is_filter_name
A function that checks if a character is valid for a filter name.
is_filter_value
A function that checks if a character is valid for a filter argument value.
parse_filter
Parse a Filter, and optionally its arguments if present.
parse_filter_args
Parser that will parse exclusively the key-values from after a filter.
The signature of a filter is filter_name = key1: value1, key2: value2,..., or just filter_name = value.
parse_filter_key_value
Parser that will parse exclusively the key-values from after a filter.
This will return the key (before the :) and the value (after the :). It will also return a key of _ if no key was provided.
parse_filters
Parsers a pipe (|) separated list of Filters.
parse_meta_comment
Parse a comment starting with either a # or // and ending with a newline.
parse_meta_key
Parse a key, that starts with an optional £, followed by an alphabetic character, then any number of alphanumeric characters, hyphens and underscores.
parse_meta_key_value
Parse a key-value pair of meta_key and meta_value.
parse_meta_line
Parse a line of meta data. This can either be a comment or a key-value pair.
parse_meta_section
Parse the meta section. This is either a :meta, <meta>, or <?meta tag surrounding a Vector of parse_meta_line.
parse_meta_value
Parse any number of characters until the end of the line or string.
parse_placeholder
Parse a template Placeholder.
parse_placeholder_locations
Consume an entire string, and return a Vector of a tuple; where the first element is a String of the variable name, and the second element is the Placeholder.
parse_title
Parse the title of the document. This is either a Markdown title or an HTML heading with the h1 tag.
parse_until_eol
Parse any character until the end of the line. This will return all characters, except the newline which will be consumed and discarded.
parse_variable
Parse a template placeholder variable. This is a £ followed by a variable name.
parse_variable_name
Variable names must start with an alphabetic character, then any number of alphanumeric characters, hyphens and underscores.
render_filter
Take a variable, and run it through a Filter function to get the new output.
replace_substring
Replaces a substring in the original string with a replacement string.
split_string
Make the start of each word capital, splitting on sep.
take_till_placeholder
Parse a string consuming - and discarding - any character, and stopping at the first matched placeholder, returning a Placeholder struct.

Type Aliases§

Span
A LocatedSpan of a string slice, with lifetime 'a.