hugo/tpl/strings
Cameron Moore 8a26ab0bc5 tpl: Do not return errors in substr for out-of-bounds cases
Most other substr implementations don't error out in out-of-bounds cases
but simply return an empty string (or a value that's printed as an empty
string). We'll follow their lead and not exit template execution.  Allow
the user decide what to do with the empty result.

Fixes #8113
2021-01-08 10:13:10 +01:00
..
init.go tpl: Add limit support to replaceRE 2020-08-28 18:57:56 +02:00
init_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
regexp.go tpl: Add limit support to replaceRE 2020-08-28 18:57:56 +02:00
regexp_test.go tpl: Add limit support to replaceRE 2020-08-28 18:57:56 +02:00
strings.go tpl: Do not return errors in substr for out-of-bounds cases 2021-01-08 10:13:10 +01:00
strings_test.go tpl: Do not return errors in substr for out-of-bounds cases 2021-01-08 10:13:10 +01:00
truncate.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00
truncate_test.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00