Skip to content
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

fix(compiler): fix interpolation regexp #6056

Closed
wants to merge 1 commit into from

Conversation

wesleycho
Copy link
Contributor

  • Fix the interpolation regexp to match newline characters (i.e. \n and \r)

This fixes #6044.

@wesleycho wesleycho force-pushed the fix/parser-interpolation branch 2 times, most recently from 4adac2f to a282ddb Compare December 21, 2015 16:45
@vicb
Copy link
Contributor

vicb commented Dec 21, 2015

From mdn

Note that the m multiline flag doesn't change the dot behavior. So to match a pattern across multiple lines, the character set [^] can be used (if you don't mean an old version of IE, of course), it will match any character including newlines.

May be the errors on Travis + SauceLabs are related ? https://travis-ci.org/angular/angular/jobs/98151942#L393

@wesleycho
Copy link
Contributor Author

Hm, could be - perhaps I should change it to (?:.|[\n\r])*? instead?

Edit: Oh, how about [\s\S]*?

- Fix the interpolation regexp to match newline characters (i.e. `\n` and `\r`)
@vicb
Copy link
Contributor

vicb commented Dec 21, 2015

([.\r\n]*?) ?

@wesleycho
Copy link
Contributor Author

. inside the character class only serves to match the literal ., and not as a wildcard - I subbed in [\s\S]*? since I remember that being an optimal solution that works for older versions of IE. I came across this SO answer, but it could potentially be out of date.

@kara kara added the action: merge The PR is ready for merge by the caretaker label Feb 1, 2016
@mary-poppins
Copy link

Merging PR #6056 on behalf of @alexeagle to branch presubmit-alexeagle-pr-6056.

@mary-poppins
Copy link

Merging PR #6056 on behalf of @alexeagle to branch presubmit-alexeagle-pr-6056.

@mhevery mhevery closed this in 9b0e10e Feb 3, 2016
@wesleycho wesleycho deleted the fix/parser-interpolation branch April 18, 2016 19:38
@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 Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mulit-line expressions are not working
6 participants