jinja2 comment out (disable) code blocks with nested comments
10:51 13 Mar 2023

Trying to figure out the best way to comment out blocks of jinja2 code that may contain other comments... e.g. this:

{# 
    {# Start Config #}
    something
    something else
    {{ some_var }}
    {% for for in bar %}
    {{ foo }}
#}

The issue seems to be that because i have {# Start Config #} the {# and #} don't seem to be working correctly e.g. looking in my sublime text editor none of the text under {# Start Config #} is commented out.

jinja2