Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($parse): properly handle dots at the end of identifiers #8559

Merged

Conversation

pkozlowski-opensource
Copy link
Member

Fixes #4613
Fixes #4912

@btford
Copy link
Contributor

btford commented Aug 20, 2014

LGTM

@@ -276,6 +276,13 @@ Lexer.prototype = {
this.index++;
}

//check if the identifier ends with . and if so move back one char
if (lastDot && ident.slice(-1) === '.') {
Copy link
Contributor

Choose a reason for hiding this comment

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

slice produces new string === garbage, let's use ident[ident.length -1] instead

@IgorMinar
Copy link
Contributor

otherwise this is good. let's get this in as soon as the corrections are made

@pkozlowski-opensource
Copy link
Member Author

Landed as 8ac9035. Thnx for the review @IgorMinar , I love how detailed your reviews are and how you care about the code. Much appreciated and motivating, cheers!

BTW: what is the policy of cherry-picking fixes to the 1.2.x branch? Are we doing it systematically for all the fixes that don't have breaking changes?

@IgorMinar
Copy link
Contributor

non-risky non-features without breaking changes should be ported
On Aug 23, 2014 3:05 AM, "Pawel Kozlowski" notifications@github.com wrote:

Landed as 8ac9035
8ac9035.
Thnx for the review @IgorMinar https://github.com/IgorMinar , I love
how detailed your reviews are and how you care about the code. Much
appreciated and motivating, cheers!

BTW: what is the policy of cherry-picking fixes to the 1.2.x branch? Are
we doing it systematically for all the fixes that don't have breaking
changes?


Reply to this email directly or view it on GitHub
#8559 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Minor] Expressions with trailing . (dot) evaluate differently in standard / ng-csp mode Spaces around '.' in expressions handled inconsistently
4 participants