chomp
Syntax
strings.Chomp STRING ⟼ any
Alias
chomp
If the argument is of type template.HTML, returns template.HTML, else returns a string.
Useful in a pipeline to remove newlines added by other processing (e.g., markdownify
).
{{ chomp "<p>Blockhead</p>\n" }} → "<p>Blockhead</p>"