Skip to content

fix: #if in partial correctly evaluates explicitly passed context (issue #459)#628

Merged
rexm merged 4 commits into
masterfrom
worktree-agent-a25f6b6365aee71b5
Jun 20, 2026
Merged

fix: #if in partial correctly evaluates explicitly passed context (issue #459)#628
rexm merged 4 commits into
masterfrom
worktree-agent-a25f6b6365aee71b5

Conversation

@rexm

@rexm rexm commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #459

  • Adds a regression test (source/Handlebars.Test/Issues/Issue459Tests.cs) that verifies {{#if}} inside a partial correctly evaluates against the explicitly passed context object when calling {{> PartialName Context}}.
  • The underlying bug was already fixed in the codebase prior to this PR; this test serves as a permanent regression guard to prevent future regressions.

Test plan

  • New test Issue459_ConditionalInPartialSeesPassedContext passes
  • All 1747 existing tests continue to pass

🤖 Generated with Claude Code

rexm and others added 2 commits June 20, 2026 08:22
…it context

Adds Issue459Tests.cs to confirm that conditional blocks inside a partial
correctly evaluate against the explicitly passed context object. The bug
was already fixed in the codebase; this test serves as a regression guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rexm rexm enabled auto-merge June 20, 2026 12:24
@sonarqubecloud

Copy link
Copy Markdown

@rexm rexm merged commit 0c2f33b into master Jun 20, 2026
7 checks passed
@rexm rexm deleted the worktree-agent-a25f6b6365aee71b5 branch June 20, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditional block does not work within a partial

1 participant