Files
hugo/content/en/functions/chomp.md
T
2023-04-03 11:50:31 -07:00

440 B

title, toc, description, categories, menu, keywords, signature, relatedfuncs
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>"