summaryrefslogtreecommitdiff
path: root/docs/content
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-06-01 17:26:53 -0400
committerGitHub <noreply@github.com>2024-06-01 21:26:53 +0000
commit7d646a828a363db3d11ece2c2c2c9c560494e95c (patch)
tree46d49be6bbadbf3c19b6bacada92ed26167edb03 /docs/content
parent0d13f844de65d1c424fafb8301e39639f8a8d410 (diff)
feat(strings): Update strings.Indent to error on bad input instead of silently doing nothing (#2089)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/functions/strings.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/content/functions/strings.md b/docs/content/functions/strings.md
index ead0dc27..5e43ac1e 100644
--- a/docs/content/functions/strings.md
+++ b/docs/content/functions/strings.md
@@ -143,6 +143,8 @@ http://example.com:80
Indents a string. If the input string has multiple lines, each line will be indented.
+As of v4.0.0, this function will error if the `width` or `indent` arguments are invalid.
+
_Added in gomplate [v1.9.0](https://github.com/hairyhenderson/gomplate/releases/tag/v1.9.0)_
### Usage
@@ -157,9 +159,9 @@ input | strings.Indent [width] [indent]
| name | description |
|------|-------------|
-| `width` | _(optional)_ number of times to repeat the `indent` string. Default: `1` |
-| `indent` | _(optional)_ the string to indent with. Default: `" "` |
-| `input` | _(required)_ the string to indent |
+| `width` | _(optional)_ Number of times to repeat the `indent` string. Must be greater than 0. Default: `1` |
+| `indent` | _(optional)_ The string to indent with. Must not contain a newline character ("\n"). Default: `" "` |
+| `input` | _(required)_ The string to indent |
### Examples