Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feel free to ignore this - I just wanted to play around with it and see if I could fix a very minor annoyance.
With this toy vapour code
I get this result
[email protected]
With the minor changes in this PR, I get
[email protected]
return()
I have not tested what else this changes or if this is even the right place to make these changes. Actually, I'm fairly sure it's not for the extra newline; it happens for other functions containing expressions, too.
One option would be to style the generated R file with e.g. {styler} which would take care of any inconsistencies from transpilation, e.g. dealing with indentation which sounds like a whole world of trouble. Running
styler::style_file("R/vapour.R")
over the file generated by [email protected] produceswhich appears to have fixed both issues.