JuliaFormatter.jl
JuliaFormatter.jl copied to clipboard
format for short begin end block
In Catalyst.jl with SciMLStyle we are seeing that
rn = @reaction_network begin
k/$V, A + B --> C
end k
gets formatted as
rn = @reaction_network begin k / $V, A + B --> C end k
Is there anything in SciMLStyle that could be changed / set to prevent this?
CC: https://github.com/SciML/SciMLStyle/issues/25
so by default the first block is how it would be formatted. SciML overrides p_begin https://github.com/domluna/JuliaFormatter.jl/blob/master/src/styles/sciml/pretty.jl#L91-L118 which is it's being formatted the way it is.
@YingboMa wrote that bit afaik https://github.com/domluna/JuliaFormatter.jl/blame/598a2485bbd36a118c66b3774e73684c4a4e9697/src/styles/sciml/pretty.jl#L91-L118
Thanks for the info! @YingboMa would you consider changing that to preserve the first form?
I am also running into this. Was there a decision made?
I think so