Strings
lower- Lower case.
upper- Upper case.
capitalize- First character upper, the rest lower.
title- Tera’s naive title case. Go’s
titleistitle_case. title_case- Title case in
style(ap,chicago,go,firstupper,none; default:titleCaseStyle). wordcount- Tera’s word count (whitespace split).
trim- Trims whitespace, or the string
patrepeatedly. trim_start- Trims leading whitespace, or
pat. trim_end- Trims trailing whitespace, or
pat. trim_chars- Trims any of the characters in
charsfrom both ends. trim_start_chars- Trims any of
charsfrom the start. trim_end_chars- Trims any of
charsfrom the end. strip_prefix- Removes
prefixonce. strip_suffix- Removes
suffixonce. replace- Replaces every
fromwithto. split- Splits on
pat. regex_replace- Replaces matches of
patternwithrep($1groups). regex_find- Matches of
pattern, at mostlimit. substrlengthcharacters fromstart(negative counts from the end).truncate- Tera’s plain-text truncate to
lengthcharacters plusend. truncate_html- Go’s HTML-aware
truncate: closes open tags,ellipsisdefault…. Keeps the input’s safety. pad_start- Pads on the left with spaces to
widthcharacters. pad_end- Pads on the right with spaces to
widthcharacters. indent- Tera’s indent.
newlines_to_br- Replaces line breaks with
<br>. pluralize- Tera’s suffix pluralizer for a count (
singular,plural). Go’sinflect.Pluralizeispluralize_word. pluralize_word- English plural of a word.
singularize_word- English singular of a word.
humanize- Go’s
humanize(my-first-post→My first post; numbers → ordinals). ordinalize1→1st.urlize- The URL-safe path form of a string, as Go’s
urlizemakes it. anchorize- An anchor id as Go generates it;
stylegithub(default),github-asciiorblackfriday. plainify- Strips HTML tags.
emojify- Replaces
:shortcode:emoji. markdownify- Renders Markdown with the current page’s hooks; a single paragraph is unwrapped.
render_string- Renders Markdown with
page’s hooks;display="block"keeps the paragraph. highlight- Syntax highlighting of the input as
lang(Chroma classes, or inline styles pernoClasses; needs the site’s highlight configuration). to_math- LaTeX to MathML and/or HTML with KaTeX 0.16.22 and mhchem, as Go renders it (SHOULD; feature
math).options: KaTeX’soutput(mathmldefault,html,htmlAndMathml),displayMode,leqno,fleqn,errorColor,macros,minRuleThickness,throwOnError(default true),strict(errordefault,ignore,warn: warnings). An error (a formula KaTeX rejects, invalid options) fails the render; withoptional=trueit is a warning (idto_math) and the result none. diagrams_goat{inner (safe SVG), width, height, wrapped}for the ASCII diagramtext(SHOULD; featuregoat).format_number- The number with
precisiondecimals in the format of the render’slang. filesize_format- Human file size (
binaryunits by default).
- lower
- upper
- capitalize
- title
- title_case
- wordcount
- trim
- trim_start
- trim_end
- trim_chars
- trim_start_chars
- trim_end_chars
- strip_prefix
- strip_suffix
- replace
- split
- regex_replace
- regex_find
- substr
- truncate
- truncate_html
- pad_start
- pad_end
- indent
- newlines_to_br
- pluralize
- pluralize_word
- singularize_word
- humanize
- ordinalize
- urlize
- anchorize
- plainify
- emojify
- markdownify
- render_string
- highlight
- to_math
- diagrams_goat
- format_number
- filesize_format