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

filter division expression with parentheses (fix #4838) #4844

Merged
merged 5 commits into from
Feb 14, 2017
Merged

filter division expression with parentheses (fix #4838) #4844

merged 5 commits into from
Feb 14, 2017

Conversation

rixlabs
Copy link
Contributor

@rixlabs rixlabs commented Feb 2, 2017

The filter parser wasn't considering "closing" parentheses in the check for regex.

Fix for issue #4838

@rixlabs
Copy link
Contributor Author

rixlabs commented Feb 3, 2017

the last commit message is wrong. I mean that I miss a lint check that's why the check failed before

@posva
Copy link
Member

posva commented Feb 4, 2017

@rixlabs Don't worry for that. We'll probably squash it just do one, clean, commit 😄
Thanks for taking the time to look into this!


it('handle division with dot', () => {
const vm = new Vue({
template: `<div>{{ 20. / 5 | double }}</div>`,
Copy link
Member

@HerringtonDarkholme HerringtonDarkholme Feb 7, 2017

Choose a reason for hiding this comment

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

what about {{ a++ / 5 }} and {{ privateVar__ / 5}}?

Template string or object literal probably does not need to be considered, IMHO,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't considered + and - and also _ I have to include those too

Copy link
Contributor Author

@rixlabs rixlabs Feb 7, 2017

Choose a reason for hiding this comment

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

made a quick test checking every single exception with /[\w).\]\+\-\_$]/ and it's working.
Maybe there is a more generic way to do this

@rixlabs
Copy link
Contributor Author

rixlabs commented Feb 7, 2017

now I also search for + - _ also sync the repo

@yyx990803 yyx990803 merged commit 7259aef into vuejs:dev Feb 14, 2017
@yyx990803
Copy link
Member

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.

4 participants