hugo/docs/content/en/functions/chomp.md
2023-05-22 16:47:07 +02:00

440 B

title toc description categories menu keywords signature relatedfuncs
chomp true Removes any trailing newline characters.
functions
docs
parent
functions
trim
chomp INPUT
strings.Chomp INPUT
truncate

Useful in a pipeline to remove newlines added by other processing (e.g., markdownify).

{{ chomp "<p>Blockhead</p>\n" }} → "<p>Blockhead</p>"