V doesn't ignore variables in HTML comment template
V version: V 0.2.4 d373eba, timestamp: 2021-10-13 09:40:14 +0300 **OS: linux, Linux version 5.14.10-200.fc34.x86_64 **
What did you do?
Create a template file with an HTML comment
<!-- @numbers -->
Do not declare or init any variable
What did you expect to see? Nothing, V should not parse comments
What did you see instead?
error: undefined ident: numbers
Example?
Simple vweb setup that loads a template file with an HTML comment. Do you prefer a full working example?
Something that will show the error message.
Question: Is numbers in your template as @numbers? If so, that's an easy "fix" - to escape the @ so it isn't seen as a template variable, double it, as in @@number.
Yes, escaping the variable, i.e. @@numbers solves the problem. However, it would be great to have the flexibility of commenting inside a template file.
Using @@ should work whether it's in a comment or not.
It works everywhere now, in case you actually do want to use it to replace something, even in comments.