summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/chomp.md
blob: c56505c2c5d0e98b376ed45e5a1b09eddc5345a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
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"]
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>"
```