Skip to content

fix: support escape sequences in tagged templates - #107

Merged
JoshuaKGoldberg merged 3 commits into
dmnd:mainfrom
marcalexiei:escape
Mar 1, 2026
Merged

JoshuaKGoldberg merged 3 commits into
dmnd:mainfrom
marcalexiei:escape

Conversation

@marcalexiei

@marcalexiei marcalexiei commented Jan 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Checklist

Overview

Fixes support for escape sequences in tagged templates by preserving raw template parts and unescaping explicit character escapes (e.g. \n, \t, \xHH, \uXXXX, \u{...}) only after indentation and trimming.

@marcalexiei

This comment was marked as outdated.

@marcalexiei

Copy link
Copy Markdown
Contributor Author

@JoshuaKGoldberg, when you have the chance, could you please review this?
Thanks in advance

@JoshuaKGoldberg

Copy link
Copy Markdown
Collaborator

👋 thanks for the ping, and sorry for the delay! Looking now.

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one suggestion around tests that doesn't need to block merging. Let me know if you don't have time to apply it and I always can later this week. Thanks again @marcalexiei! 🙌

Comment thread src/dedent.test.ts Resolved
@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Feb 28, 2026
@github-actions github-actions Bot removed the status: waiting for author Needs an action taken by the original poster label Mar 1, 2026

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 awesome, thanks!

@JoshuaKGoldberg
JoshuaKGoldberg merged commit 34f5d32 into dmnd:main Mar 1, 2026
11 checks passed
@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown

🎉 This is included in version v1.7.2 🎉

The release is available on:

Cheers! 📦🚀

@marcalexiei
marcalexiei deleted the escape branch March 1, 2026 21:21
@alumni

alumni commented Mar 3, 2026

Copy link
Copy Markdown

@marcalexiei @JoshuaKGoldberg I think escaping the escape character is still a problem, #95 (comment) is still valid even after this change.

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.

Does not support escape sequences

3 participants