This commit is contained in:
MistY 2024-10-25 22:24:38 +08:00 committed by GitHub
parent ac09690635
commit cbb6677ec5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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