[][src]Module askama_filters::filters

The main collection of filters. These filters do not require a feature flag.

Functions

link

Expands links into a tags to the link with the same text.

list

Formats a slice or Vec into an ordered or unordered list. The ordered param controls if it will be an ol or ul tag.

postfix

Replaces a postfix at the end of a word with an expanded form. See prefix.

prefix

Replaces a prefix at the beginning of a word with an expanded form. Useful in combination with other filters or as a shorthand.

regex

Applies a Regular Expression replacement to the text. Will throw an error if the supplied regex string is invalid. See the regex crate docs for more info. The second argument the regex should be a raw string like r"\d+".

smarty

Replaces straight quotes with curly quotes, and turns -- and --- to en- and em-dash and ... into an ellipsis.

tag

Similar to prefix but instead creates an a tag with the matched word as the text and the expanded as the href with the text appended. Useful for things like #hashtags.

title

Converts text into title case.