-
Notifications
You must be signed in to change notification settings - Fork 98
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
Enable the folding of binary operations #613
Conversation
Thanks for working on this! Would you like to add some test cases to |
Thanks for the test cases. As for |
"\\?" | ||
) | ||
binary_opts_regex <- paste0(binary_opts, collapse = "|") | ||
binary_opts_ending_regex <- paste0("^[^#]*(", binary_opts_regex, ")\\s*(#.*)?$") |
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.
Just did a small refactoring here to put the regex pre-computed. It is also useful to fix #607 in on-type-formatting. I'll probably put these into utils.R
in a later PR so that both folding and on-type-formatting could share this.
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.
LGTM
Everything is fine, thanks for the code reviewing |
Sorry for my bad coding style which may prevent the understanding, In this commit I also tried to add more notes comment.
But the main purpose is to fix REditorSupport/vscode-R#1076
Binary operations are collapsed
