summaryrefslogtreecommitdiffstats
path: root/tpl/strings
AgeCommit message (Collapse)Author
2018-11-30tpl: Add godoc packages commentsCameron Moore
Also fix package name in tpl/templates.
2018-10-16commands: Show server error info in browserBjørn Erik Pedersen
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes #5284 Fixes #5290 See #5325 See #5324
2018-09-07tpl/strings: Add strings.FirstUpperBjørn Erik Pedersen
Fixes #5174
2018-06-04tpl/strings: strings.RuneCountDavid E. Wheeler
2018-06-03tpl/strings: Remove overflow check in strings.RepeatBjørn Erik Pedersen
The test fails on 32 bit systems. Let it panic instead.
2018-06-03tpl/strings: Adjust the overflow validation in strings.RepeatBjørn Erik Pedersen
This now matches the validation in the stdlib, but we return an error instead.
2018-06-03tpl: Add strings.RepeatDavid E. Wheeler
2017-12-17tpl/strings: Fix broken testBjørn Erik Pedersen
2017-12-16Make chomp return the type it receivesVictor Kropp
fixes #2187
2017-08-18tpl: Cleanup strings.TrimPrefix and TrimSuffixCameron Moore
These funcs were added during the move to namespaces but were undocumented. This commit fixes the order of the arguments and adds the funcs to the method mapping.
2017-08-18tpl: Add strings.TrimLeft and TrimRight Cameron Moore
2017-08-03Add some missing doc commentsJorin Vogel
As pointed out by the linter, some exported functions and types are missing doc comments. The linter warnings have been reduced from 194 to 116. Not all missing comments have been added in this commit though.
2017-07-31Make the title case style guide configurableBjørn Erik Pedersen
This works for the `title` func and the other places where Hugo makes title case. * AP style (new default) * Chicago style * Go style (what we have today) Fixes #989
2017-06-13Run gofmt to get imports in line vs gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-05-20tpl: Make the Namespace func signature explicitBjørn Erik Pedersen
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
2017-05-02tpl: Add basic tests for all namespace init funcsCameron Moore
2017-05-01tpl: Add docshelper for template funcsBjørn Erik Pedersen
And fix some other minor related issues. Updates #3418
2017-05-01tpl: Fix the remaining template funcs namespace issuesBjørn Erik Pedersen
See #3042
2017-05-01tpl/strings: Make it a package that stands on its ownBjørn Erik Pedersen
See #3042
2017-04-30tpl: Add template function namespacesCameron Moore
This commit moves almost all of the template functions into separate packages under tpl/ and adds a namespace framework. All changes should be backward compatible for end users, as all existing function names in the template funcMap are left intact. Seq and DoArithmatic have been moved out of the helpers package and into template namespaces. Most of the tests involved have been refactored, and many new tests have been written. There's still work to do, but this is a big improvement. I got a little overzealous and added some new functions along the way: - strings.Contains - strings.ContainsAny - strings.HasSuffix - strings.TrimPrefix - strings.TrimSuffix Documentation is forthcoming. Fixes #3042