From ce428a9cca261c12df0e71688d2252bce98bed58 Mon Sep 17 00:00:00 2001 From: Ryan Watters Date: Wed, 5 Apr 2017 18:31:18 -0500 Subject: [PATCH] Update trim description with note on whitespace --- content/functions/trim.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/functions/trim.md b/content/functions/trim.md index bdd08a4a4..d219c13c5 100644 --- a/content/functions/trim.md +++ b/content/functions/trim.md @@ -28,10 +28,15 @@ deprecated: false {{ trim .Inner}} ``` -Instead, the following example tells `trim` to remove extra new lines from the content contained in the `.Inner`, which has specific usage with [shortcodes](/templates/shortcode-templates/): +Instead, the following example tells `trim` to remove extra new lines from the content contained in the [shortcode `.Inner` variable][shortcodevars]: ``` {{ trim .Inner "\n" }} ``` +{{% note %}} Go templates also provide a simple [method for trimming whitespace](/templates/introduction/#whitespace) from either side of a Go tag by including a hyphen (`-`). +{{% /note %}} + + +[shortcodevars]: /variables/shortcodes/ \ No newline at end of file