From 7d646a828a363db3d11ece2c2c2c9c560494e95c Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 1 Jun 2024 17:26:53 -0400 Subject: feat(strings): Update strings.Indent to error on bad input instead of silently doing nothing (#2089) Signed-off-by: Dave Henderson --- docs-src/content/functions/strings.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs-src') diff --git a/docs-src/content/functions/strings.yml b/docs-src/content/functions/strings.yml index c78d040d..0c2cc863 100644 --- a/docs-src/content/functions/strings.yml +++ b/docs-src/content/functions/strings.yml @@ -95,17 +95,19 @@ funcs: alias: indent description: | 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. pipeline: true arguments: - name: width required: false - description: 'number of times to repeat the `indent` string. Default: `1`' + description: 'Number of times to repeat the `indent` string. Must be greater than 0. Default: `1`' - name: indent required: false - description: 'the string to indent with. Default: `" "`' + description: 'The string to indent with. Must not contain a newline character ("\n"). Default: `" "`' - name: input required: true - description: the string to indent + description: The string to indent rawExamples: - | This function can be especially useful when adding YAML snippets into other YAML documents, where indentation is important: -- cgit v1.2.3