From 1aaab2a81407c669ba1705b03c2d4925e5b6aaa6 Mon Sep 17 00:00:00 2001 From: Sam Machin Date: Thu, 12 Aug 2021 16:41:32 +0100 Subject: [PATCH 1/2] change template characters Added note about changing template characters --- .../@node-red/nodes/locales/en-US/function/80-template.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html b/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html index 95fa14225..196d14c74 100644 --- a/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html +++ b/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html @@ -47,5 +47,9 @@ {{global.name}}, or for persistable store store use {{flow[store].name}} or {{global[store].name}}.

Note: By default, mustache will escape any non-alphanumeric or HTML entities in the values it substitutes. - To prevent this, use {{{triple}}} braces. + To prevent this, use {{{triple}}} braces.

+

You can change the characters used for templating (if for example you need to use {{ }} within your content) by adding a line to the top of the template itself, + to change to use [[ ]] add: + {{=[[ ]]=}} + To the start of your template.

From 702dfa4b79a2bf83d95815bdb5867a0d706c927a Mon Sep 17 00:00:00 2001 From: Sam Machin Date: Tue, 31 Aug 2021 16:59:32 +0100 Subject: [PATCH 2/2] Update packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html Co-authored-by: Nick O'Leary --- .../nodes/locales/en-US/function/80-template.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html b/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html index 196d14c74..d2ffe43f9 100644 --- a/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html +++ b/packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html @@ -48,8 +48,8 @@ {{global[store].name}}.

Note: By default, mustache will escape any non-alphanumeric or HTML entities in the values it substitutes. To prevent this, use {{{triple}}} braces.

-

You can change the characters used for templating (if for example you need to use {{ }} within your content) by adding a line to the top of the template itself, - to change to use [[ ]] add: - {{=[[ ]]=}} - To the start of your template.

+

If you need to use {{ }} within your content, you can change the characters + used to mark the templated sections. For example, to use [[ ]] + instead, add the following line to the top of the template:

+
{{=[[ ]]=}}