We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use https://pkg.go.dev/strings#TrimSpace so we can do this:
{{ $v | strings.TrimSpace }}
Instead of this:
{{ strings.Trim $v "\n\r " }}
In addition to having a standard definition of white space, we can pipe values into strings.TrimSpace. We can't pipe values into strings.Trim.
strings.TrimSpace
strings.Trim
The text was updated successfully, but these errors were encountered:
tpl/strings: Add TrimSpace function
d7701bd
Closes gohugoio#12962
d37606d
Closes #12962
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sorry, something went wrong.
jmooring
Successfully merging a pull request may close this issue.
Use https://pkg.go.dev/strings#TrimSpace so we can do this:
Instead of this:
In addition to having a standard definition of white space, we can pipe values into
strings.TrimSpace
. We can't pipe values intostrings.Trim
.The text was updated successfully, but these errors were encountered: