fix: resolve nested Jinja2 comment causing template error

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 <noreply@anthropic.com>
This commit is contained in:
2025-12-31 19:01:10 +01:00
parent 94677f946b
commit ff9fa9d887

View File

@@ -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")
<div>Analytics content here</div>
{% 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")
=============================================================================
#}
{# =============================================================================