formatR
formatR copied to clipboard
any way to automatically add braces for single line statement?
Any way to automatically add braces for single line code inside if or something like that?
For the source code like this:
if (TRUE)
a = 1
b = 2
Current default result for tidy_source():
if (TRUE) a = 1
b = 2
Expected formatted result (of the requested feature):
if (TRUE) {
a = 1
}
b = 2
Nope, but if you can figure out how to implement it, I'd be glad to take a look at your pull request :)