This commit is contained in:
MistY
2024-10-25 22:24:38 +08:00
committed by GitHub
parent ac09690635
commit cbb6677ec5
+4 -4
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
```