- Notifications
You must be signed in to change notification settings - Fork26.7k
fix(compiler): ensure that placeholders have the correct sourceSpan#39717
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
06d498c to73df49dCompareUh oh!
There was an error while loading.Please reload this page.
dab6e08 to08f5c7eCompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the cleanup and the fix@petebacondarwin 👍
@petebacondarwin FYI, presubmit is successful for the changes in this PR. Thank you. |
This helper improves the message given when an expectationfails in a source-mapping test.
When the `preserveWhitespaces` is not true, the template parser willprocess the parsed AST nodes to remove excess whitespace. Since thegenerated `goog.getMsg()` statements rely upon the AST nodes afterthis whitespace is removed, the i18n extraction must make a second pass.Previously this resulted in innacurrate source-spans for the i18n text andplaceholder nodes that were extracted in the second pass.This commit fixes this by reusing the source-spans from the first passwhen extracting the nodes in the second pass.Fixesangular#39671
When parsing for i18n messages, interpolated strings aresplit into `Text` and `Placeholder` pieces. The method thatdoes this `_visitTextWithInterpolation()` was becoming toocomplex. This commit refactors that method along with someassociated functions that it uses.
08f5c7e to9ee0012CompareThis helper improves the message given when an expectationfails in a source-mapping test.PRClose#39717
…39717)When the `preserveWhitespaces` is not true, the template parser willprocess the parsed AST nodes to remove excess whitespace. Since thegenerated `goog.getMsg()` statements rely upon the AST nodes afterthis whitespace is removed, the i18n extraction must make a second pass.Previously this resulted in innacurrate source-spans for the i18n text andplaceholder nodes that were extracted in the second pass.This commit fixes this by reusing the source-spans from the first passwhen extracting the nodes in the second pass.Fixes#39671PRClose#39717
When parsing for i18n messages, interpolated strings aresplit into `Text` and `Placeholder` pieces. The method thatdoes this `_visitTextWithInterpolation()` was becoming toocomplex. This commit refactors that method along with someassociated functions that it uses.PRClose#39717
…39717)When the `preserveWhitespaces` is not true, the template parser willprocess the parsed AST nodes to remove excess whitespace. Since thegenerated `goog.getMsg()` statements rely upon the AST nodes afterthis whitespace is removed, the i18n extraction must make a second pass.Previously this resulted in innacurrate source-spans for the i18n text andplaceholder nodes that were extracted in the second pass.This commit fixes this by reusing the source-spans from the first passwhen extracting the nodes in the second pass.Fixes#39671PRClose#39717
When parsing for i18n messages, interpolated strings aresplit into `Text` and `Placeholder` pieces. The method thatdoes this `_visitTextWithInterpolation()` was becoming toocomplex. This commit refactors that method along with someassociated functions that it uses.PRClose#39717
This issue has been automatically locked due to inactivity. Read more about ourautomatic conversation locking policy. This action has been performed automatically by a bot. |
When the
preserveWhitespacesis not true, the template parser willprocess the parsed AST nodes to remove excess whitespace. Since the
generated
goog.getMsg()statements rely upon the AST nodes afterthis whitespace is removed, the i18n extraction must make a second pass.
Previously this resulted in innacurrate source-spans for the i18n text and
placeholder nodes that were extracted in the second pass.
This commit fixes this by reusing the source-spans from the first pass
when extracting the nodes in the second pass.
Fixes#39671