From 7857a0d4045b7a4809a1a4191f2ab6eb718a7c54 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Mon, 17 Dec 2018 11:40:27 -0800 Subject: [PATCH] clarify use of split function in docs --- website/source/docs/templates/engine.html.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/source/docs/templates/engine.html.md b/website/source/docs/templates/engine.html.md index e1b59cdff..aae419098 100644 --- a/website/source/docs/templates/engine.html.md +++ b/website/source/docs/templates/engine.html.md @@ -272,6 +272,11 @@ builder in this example. The function `split` takes an input string, a seperator string, and a numeric component value and returns the requested substring. +Please note that you cannot use the `split` function on user variables, +because we can't nest the functions currently. This function is indended to +be used on builder variables like build_name. If you need a split user +variable, the best way to do it is to create a separate variable. + Here are some examples using the above options: ``` liquid @@ -292,7 +297,7 @@ this case, on the `fixed-string` value): "type": "vagrant", "compression_level": 9, "keep_input_artifact": false, - "vagrantfile_template": "tpl/{{split build_name \"-\" 1}.rb", + "vagrantfile_template": "tpl/{{split build_name \"-\" 1}}.rb", "output": "output/{{build_name}}.box", "only": [ "org-name-provider"