Conversation
petebacondarwin
left a comment
There was a problem hiding this comment.
I love the tests. Nice work @cexbrayat.
I worry that this fix is more of a hack to work around something more serious wrong in the lexer.
I think that instead there should be a fix in the _attemptCharCodeUntilFn or _advance methods...
|
@petebacondarwin Yes, that's what I think as well, but I'm not sure what should be the proper way to fix it... |
|
Yes. The Also the fix you have would not help for longer escape sequences like variable Unicode ones. |
Prior to this fix, inline templates including sequences like `<t\\n>` or `<t a=\\nb>` were failing. This introduces a dedicated index to track the advance during escape sequences. The actual index then catches up when the escape sequence is over. This allows to not consume `$BACKSLASH` tokens when not needed. Fixes angular#28843
|
@petebacondarwin I think I understand what you mean and attempted a proper fix. The amended commit now has a dedicated index to track the advanced during escape sequences, and the index only catches up when needed. |
|
Superseeded by #28978 |
|
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. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #28843
What is the new behavior?
The PR introduces two new tests to reproduce the issue found, and a fix/workaround.
I'm not sure this is the ideal way to fix the issue, @petebacondarwin will know better.
But I included the workaround I found to give a little more context about the issue.
Does this PR introduce a breaking change?