Skip to content

fix(syntaxes): Adjust block syntax highlighting to require ( or { on … #1961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

atscott
Copy link
Collaborator

@atscott atscott commented Nov 8, 2023

…same line

While our parser allows for a block name to be defined on a separate line from the expression or brace, the syntax highlighting will not. Because the extension may be used for older versions of Angular and we cannot turn highlighting on and off dynamically like we can the parser, we make the highlighting more restrictive. This should cover a majority of use-cases where @ is used in older versions of Angular like in emails and not begin block highlighting.

Partially addresses #1958. Will need another change to detect Angular version and disable block parsing.

@atscott atscott force-pushed the requireBraceOrParenOnBlockLineForSyntaxes branch from 24fa330 to f194d30 Compare November 8, 2023 14:43
@atscott atscott added target: major This PR is targeted for the next major release action: merge Ready to merge labels Nov 8, 2023
…same line

While our parser allows for a block name to be defined on a separate
line from the expression or brace, the syntax highlighting will not.
Because the extension may be used for older versions of Angular and we
cannot turn highlighting on and off dynamically like we can the parser,
we make the highlighting more restrictive. This should cover a majority
of use-cases where `@` is used in older versions of Angular like in
emails and _not_ begin block highlighting.

Partially addresses angular#1958. Will need another change to detect Angular
version and disable block parsing.
@atscott atscott force-pushed the requireBraceOrParenOnBlockLineForSyntaxes branch from f194d30 to 832564d Compare November 8, 2023 15:16
@dylhunn dylhunn self-requested a review November 8, 2023 15:31
@atscott atscott merged commit 075047a into angular:main Nov 8, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge Ready to merge target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants