Merge commit 'de0df119b504a91c9e1f442b07954f366ffb2932'

This commit is contained in:
Bjørn Erik Pedersen
2024-11-13 11:07:57 +01:00
89 changed files with 745 additions and 856 deletions

View File

@@ -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
```