mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'
This commit is contained in:
@@ -2,25 +2,19 @@
|
||||
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"
|
||||
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>"
|
||||
```go-html-template
|
||||
{{ chomp "<p>Blockhead</p>\n" }} → "<p>Blockhead</p>"
|
||||
```
|
||||
|
Reference in New Issue
Block a user