From ff9fa9d887a8cc96e55b3e91a2e6d3af7112d0fb Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Wed, 31 Dec 2025 19:01:10 +0100 Subject: [PATCH] fix: resolve nested Jinja2 comment causing template error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The feature_gate.html macro file had nested {# #} comments in the documentation block which broke Jinja2 parsing. Nested comments are not supported in Jinja2 - the inner {# was interpreted as closing the outer comment, causing the example code to execute. Removed Jinja2 syntax from the documentation examples to prevent parsing issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- app/templates/shared/macros/feature_gate.html | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/templates/shared/macros/feature_gate.html b/app/templates/shared/macros/feature_gate.html index 2dca46bf..59d48000 100644 --- a/app/templates/shared/macros/feature_gate.html +++ b/app/templates/shared/macros/feature_gate.html @@ -1,23 +1,25 @@ -{# ============================================================================= +{# + ============================================================================= Feature Gate Macros Provides macros for tier-based feature gating in templates. Uses Alpine.js $store.features for dynamic checking. Usage: - {% from "shared/macros/feature_gate.html" import feature_gate, feature_locked, upgrade_banner %} + from "shared/macros/feature_gate.html" import feature_gate, feature_locked, upgrade_banner - {# Show content only if feature is available #} - {% call feature_gate("analytics_dashboard") %} + Show content only if feature is available: + call feature_gate("analytics_dashboard")
Analytics content here
- {% endcall %} + endcall - {# Show locked state with upgrade prompt #} - {{ feature_locked("analytics_dashboard", "Analytics Dashboard", "View advanced analytics") }} + Show locked state with upgrade prompt: + feature_locked("analytics_dashboard", "Analytics Dashboard", "View advanced analytics") - {# Show upgrade banner #} - {{ upgrade_banner("analytics_dashboard") }} - ============================================================================= #} + Show upgrade banner: + upgrade_banner("analytics_dashboard") + ============================================================================= +#} {# =============================================================================