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. 詳しく見る »
transform.Emojify INPUT ⟼ template.HTMLRuns a string through the Emoji emoticons processor. 詳しく見る »
transform.Highlight INPUT LANG [OPTIONS] ⟼ template.HTMLRenders code with a syntax highlighter. 詳しく見る »
transform.HighlightCodeBlock CONTEXT [OPTIONS] ⟼ highlight.HighlightResultHighlights code received in context within a code block render hook. 詳しく見る »
transform.HTMLEscape INPUT ⟼ stringReturns the given string, escaping special characters by replacing them with HTML entities. 詳しく見る »
transform.HTMLUnescape INPUT ⟼ stringReturns the given string, replacing each HTML entity with its corresponding character. 詳しく見る »
transform.Markdownify INPUT ⟼ template.HTMLRenders Markdown to HTML. 詳しく見る »
transform.Plainify INPUT ⟼ template.HTMLReturns a string with all HTML tags removed. 詳しく見る »
transform.Remarshal FORMAT INPUT ⟼ stringMarshals a string of serialized data, or a map, into a string of serialized data in the specified format. 詳しく見る »
transform.ToMath EXPRESSION [OPTIONS] ⟼ types.Result[template.HTML]Renders a math expression using KaTeX. 詳しく見る »
transform.Unmarshal [OPTIONS] INPUT ⟼ anyParses serialized data and returns a map or an array. Supports CSV, JSON, TOML, YAML, and XML. 詳しく見る »
transform.XMLEscape INPUT ⟼ stringReturns the given string, removing disallowed characters then escaping the result to its XML equivalent. 詳しく見る »