-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Conversation
the last commit message is wrong. I mean that I miss a lint check that's why the check failed before |
@rixlabs Don't worry for that. We'll probably squash it just do one, clean, commit 😄 |
|
||
it('handle division with dot', () => { | ||
const vm = new Vue({ | ||
template: `<div>{{ 20. / 5 | double }}</div>`, |
There was a problem hiding this comment.
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,
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
now I also search for + - _ also sync the repo |
Thanks! |
The filter parser wasn't considering "closing" parentheses in the check for regex.
Fix for issue #4838