fix(compiler): more permissive parsing of @ characters #62644
fix(compiler): more permissive parsing of @ characters #62644crisbeto wants to merge 2 commits intoangular:mainfrom
Conversation
There were 26 duplicated block tests in `lexer_spec.ts`, likely due to merge conflicts. These changes remove the duplicates while keeping the 6 tests that were different.
When we introduced blocks, we made a deliberate decision to treat the `@` character as a reserved character in case we need to use it for other syntax in the future. This meant that some common cases, like writing out an email address in the template, can be broken. After some recent discussions we decided to relax the requirement and only treat `@` as a reserve character if it's followed by a character sequence that matches a known block.
|
Currently, this doesn't allow |
I'm not sure we should do this, because in some cases if people want to control the whitespace, they might write something like |
|
This PR was merged into the repository by commit 18a6750. The changes were merged into the following branches: main, 20.1.x |
There were 26 duplicated block tests in `lexer_spec.ts`, likely due to merge conflicts. These changes remove the duplicates while keeping the 6 tests that were different. PR Close #62644
When we introduced blocks, we made a deliberate decision to treat the `@` character as a reserved character in case we need to use it for other syntax in the future. This meant that some common cases, like writing out an email address in the template, can be broken. After some recent discussions we decided to relax the requirement and only treat `@` as a reserve character if it's followed by a character sequence that matches a known block. PR Close #62644
When we introduced blocks, we made a deliberate decision to treat the `@` character as a reserved character in case we need to use it for other syntax in the future. This meant that some common cases, like writing out an email address in the template, can be broken. After some recent discussions we decided to relax the requirement and only treat `@` as a reserve character if it's followed by a character sequence that matches a known block. PR Close #62644
I can confirm that this is sadly something we had to do in one or two places. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
When we introduced blocks, we made a deliberate decision to treat the
@character as a reserved character in case we need to use it for other syntax in the future. This meant that some common cases, like writing out an email address in the template, can be broken.After some recent discussions we decided to relax the requirement and only treat
@as a reserve character if it's followed by a character sequence that matches a known block.