Skip to content

#2319 Don't treat @let as Angular control flow#2388

Open
anhallbe wants to merge 1 commit intobeautifier:mainfrom
anhallbe:angular-let-syntax
Open

#2319 Don't treat @let as Angular control flow#2388
anhallbe wants to merge 1 commit intobeautifier:mainfrom
anhallbe:angular-let-syntax

Conversation

@anhallbe
Copy link

@anhallbe anhallbe commented Dec 17, 2025

Description

If I understand things correctly, the formatter treats Angular's @let syntax as the start of a control-flow block. This should fix that.

I haven't contributed before so I don't really know what I'm doing, but I figured it was worth a shot and try to solve it since this issue is preventing me from using the VS Code HTML formatter.

Note: There may be a more performant way to do this other than using negative lookahead. If anybody has a better idea then I'm open to that!

Note2: While this should solve the issue of @let breaking the formatting, it doesn't add any formatting to @let. So I assume it will just be treated as a text node, which isn't ideal.

Fixes Issue:
#2319

Before Merge Checklist

These items can be completed after PR is created.

(Check any items that are not applicable (NA) for this PR)

  • JavaScript implementation
  • [NA] Python implementation (NA if HTML beautifier)
  • Added Tests to data file(s)
  • [NA] Added command-line option(s) (NA if
  • [NA] README.md documents new feature/option(s)

Copy link

@Smankusors Smankusors left a comment

Choose a reason for hiding this comment

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

I tested this locally, and it works, LGTM!

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.

2 participants