mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Merge commit 'de0df119b504a91c9e1f442b07954f366ffb2932'
This commit is contained in:
@@ -7,6 +7,7 @@ action:
|
||||
aliases: [chomp]
|
||||
related:
|
||||
- functions/strings/Trim
|
||||
- functions/strings/TrimSpace
|
||||
- functions/strings/TrimLeft
|
||||
- functions/strings/TrimPrefix
|
||||
- functions/strings/TrimRight
|
||||
@@ -19,9 +20,9 @@ aliases: [/functions/chomp]
|
||||
If the argument is of type `template.HTML`, returns `template.HTML`, else returns a `string`.
|
||||
|
||||
```go-html-template
|
||||
{{ chomp | "foo\n" }} → foo
|
||||
{{ chomp | "foo\n\n" }} → foo
|
||||
{{ chomp "foo\n" }} → foo
|
||||
{{ chomp "foo\n\n" }} → foo
|
||||
|
||||
{{ chomp | "foo\r\n" }} → foo
|
||||
{{ chomp | "foo\r\n\r\n" }} → foo
|
||||
{{ chomp "foo\r\n" }} → foo
|
||||
{{ chomp "foo\r\n\r\n" }} → foo
|
||||
```
|
||||
|
Reference in New Issue
Block a user