mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
26 lines
528 B
Markdown
26 lines
528 B
Markdown
---
|
|
title: chomp
|
|
toc: true
|
|
description: Removes any trailing newline characters.
|
|
date: 2017-02-01
|
|
publishdate: 2017-02-01
|
|
lastmod: 2017-02-01
|
|
categories: [functions]
|
|
menu:
|
|
docs:
|
|
parent: "functions"
|
|
keywords: [trim]
|
|
signature:
|
|
- "chomp INPUT"
|
|
- "strings.Chomp INPUT"
|
|
workson: []
|
|
hugoversion:
|
|
relatedfuncs: [truncate]
|
|
deprecated: false
|
|
---
|
|
|
|
Useful in a pipeline to remove newlines added by other processing (e.g., [`markdownify`](/functions/markdownify/)).
|
|
|
|
```
|
|
{{chomp "<p>Blockhead</p>\n"}} → "<p>Blockhead</p>"
|
|
```
|