Skip to content

fix: preserve backslashes in template literal text (issue #462)#623

Merged
rexm merged 2 commits into
masterfrom
worktree-agent-a67c838e4d20c7db7
Jun 20, 2026
Merged

fix: preserve backslashes in template literal text (issue #462)#623
rexm merged 2 commits into
masterfrom
worktree-agent-a67c838e4d20c7db7

Conversation

@rexm

@rexm rexm commented Jun 20, 2026

Copy link
Copy Markdown
Member

Fixes #462

Backslashes in template literal text are no longer treated as escape sequences and pass through verbatim.

The pattern \\{{expr}} still collapses to a single literal backslash followed by the evaluated expression (per Handlebars.js spec), but \\ elsewhere in template text now passes through unchanged.

rexm and others added 2 commits June 19, 2026 20:56
Backslashes in template literal text are no longer treated as escape
sequences unless they appear as \\ immediately before a {{ expression.
The pattern \\{{ still collapses to a single literal backslash followed
by the evaluated expression (per Handlebars.js spec), but \\ elsewhere
in template text passes through verbatim.

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

Copy link
Copy Markdown

@rexm rexm merged commit f1945ca into master Jun 20, 2026
7 checks passed
@rexm rexm deleted the worktree-agent-a67c838e4d20c7db7 branch June 20, 2026 16:36
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.

HandleBars.Compile replaces '\\' (double backslash) with '\' single backslash

1 participant