Transform functions
Use these functions to transform values from one format to another.
Use these functions to transform values from one format to another.
transform.CanHighlight LANGUAGE ⟼ boolReports whether the given code language is supported by the Chroma highlighter. Read More »
transform.Emojify INPUT ⟼ template.HTMLRuns a string through the Emoji emoticons processor. Read More »
transform.Highlight INPUT LANG [OPTIONS] ⟼ template.HTMLRenders code with a syntax highlighter. Read More »
transform.HighlightCodeBlock CONTEXT [OPTIONS] ⟼ highlight.HighlightResultHighlights code received in context within a code block render hook. Read More »
transform.HTMLEscape INPUT ⟼ stringReturns the given string, escaping special characters by replacing them with HTML entities. Read More »
transform.HTMLUnescape INPUT ⟼ stringReturns the given string, replacing each HTML entity with its corresponding character. Read More »
transform.Markdownify INPUT ⟼ template.HTMLRenders Markdown to HTML. Read More »
transform.Plainify INPUT ⟼ template.HTMLReturns a string with all HTML tags removed. Read More »
transform.Remarshal FORMAT INPUT ⟼ stringMarshals a string of serialized data, or a map, into a string of serialized data in the specified format. Read More »
transform.ToMath EXPRESSION [OPTIONS] ⟼ types.Result[template.HTML]Renders a math expression using KaTeX. Read More »
transform.Unmarshal [OPTIONS] INPUT ⟼ anyParses serialized data and returns a map or an array. Supports CSV, JSON, TOML, YAML, and XML. Read More »
transform.XMLEscape INPUT ⟼ stringReturns the given string, removing disallowed characters then escaping the result to its XML equivalent. Read More »