Add template directives support (%{if}, %{for}) in quoted strings#276
Merged
kkozik-amplify merged 4 commits intorelease/8.xfrom Mar 31, 2026
Merged
Add template directives support (%{if}, %{for}) in quoted strings#276kkozik-amplify merged 4 commits intorelease/8.xfrom
kkozik-amplify merged 4 commits intorelease/8.xfrom
Conversation
…t_specialized.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ass-level constant DBLQUOTE was changed to match \" in addition to " but TEMPLATE_STRING already handles escaped-quote strings inside directive expressions. Reverted to the simpler literal match. Also moved _directive_rules from a per-call local tuple to a class-level set in HCLReconstructor for performance, and added a clarifying comment on the TEMPLATE_STRING regex. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add rules/directives.py entry and TemplateStringRule to rules/strings.py entry to reflect new template directive support added in this branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rddimon
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
%{if},%{else},%{endif},%{for},%{endfor}) within quoted strings, including strip markers (~) and nested directivesCaused by #247
Test plan
"kms%{ if var.id != \"primary\" }-${var.id}%{ endif }"🤖 Generated with Claude Code