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

Handle back-ticks in expression #3292

Merged
merged 1 commit into from Jul 22, 2016
Merged

Conversation

skyronic
Copy link

This fixes #3273 but might introduce other bugs. I'm not sure of it.

@@ -23,7 +23,7 @@ const improperKeywordsRE =

const wsRE = /\s/g
const newlineRE = /\n/g
const saveRE = /[\{,]\s*[\w\$_]+\s*:|('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`)|new |typeof |void /g
const saveRE = /[\{,]\s*[\w\$_]+\s*:|('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\"']|\\.|)*`|`(?:[^`\\]|\\.)*`)|new |typeof |void /g
Copy link
Author

Choose a reason for hiding this comment

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

There's a stray "|" which should be removed here I guess.

@yyx990803
Copy link
Member

Can you add an accompanying test case?

@skyronic
Copy link
Author

@yyx990803: updated commit with test case.

@yyx990803 yyx990803 merged commit b8f730c into vuejs:dev Jul 22, 2016
@sirlancelot
Copy link

Thanks!

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

Successfully merging this pull request may close these issues.

Bad parsing when bound data contains a backtick
3 participants