X Tutup
Skip to content

fix(compiler): fix interpolation regexp#6056

Closed
wesleycho wants to merge 1 commit intoangular:masterfrom
wesleycho:fix/parser-interpolation
Closed

fix(compiler): fix interpolation regexp#6056
wesleycho wants to merge 1 commit intoangular:masterfrom
wesleycho:fix/parser-interpolation

Conversation

@wesleycho
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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`)
@wesleycho wesleycho force-pushed the fix/parser-interpolation branch from a282ddb to 881d66b Compare December 21, 2015 21:39
@vicb
Copy link
Copy Markdown
Contributor

vicb commented Dec 21, 2015

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

@wesleycho
Copy link
Copy Markdown
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
Copy Markdown

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

@mary-poppins
Copy link
Copy Markdown

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
Copy Markdown

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

X Tutup