From 44d2647e2d41e54fc6543d9aee6856893957c89c Mon Sep 17 00:00:00 2001 From: Martin Skou Date: Sat, 3 Aug 2024 21:34:28 +0200 Subject: [PATCH] parser: document that `@@` can be used to represent a literal `@` in `$tmpl()` templates (#21983) --- vlib/v/TEMPLATES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vlib/v/TEMPLATES.md b/vlib/v/TEMPLATES.md index d5b83ce4c4..28d0b9bac4 100644 --- a/vlib/v/TEMPLATES.md +++ b/vlib/v/TEMPLATES.md @@ -157,3 +157,8 @@ where you can insert your src All variables, which are declared before the $tmpl can be used through the `@{my_var}` syntax. It's also possible to use properties of structs here like `@{my_struct.prop}`. + +# Escaping + +The `@` symbol starts a template directive. If you need to use `@` as a regular +character within a template, escape it by using a double `@` like this: `@@`.