Skip to content

Conversation

kt3k
Copy link
Contributor

@kt3k kt3k commented Jun 5, 2025

This PR fixes the handling of indent inside the template literals with embedded languages.

Currently the leading whitespaces in the line of embedded external languages are handled as part of source code, and that causes the issue denoland/deno#29164 . This PR fixes it by skipping the leading whitespaces, but instead adding StartIndent and FinishIndent IR signals based on current indent level of the embedded language.

related denoland/deno#29164

kt3k and others added 2 commits June 5, 2025 16:01
Co-authored-by: Mauro Bieg <mb21@users.noreply.github.com>
Co-authored-by: Mauro Bieg <mb21@users.noreply.github.com>
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM.

@dsherret dsherret merged commit 389e9a8 into dprint:main Jun 12, 2025
3 checks passed
@kt3k kt3k deleted the fix-indent-inside-embedded-lang branch June 13, 2025 01:05
kt3k added a commit to denoland/deno that referenced this pull request Jun 17, 2025
This commit fixes the handling of indent inside the template languages.

See dprint/dprint-plugin-typescript#718 for
details
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.

3 participants