DocumentFormat.jl does not seem to recognize function definitions as indent-needing blocks when they are contained within other begin blocks (or maybe just macro begin blocks?). The example is from the Mimi.jl framework, where this is common.
Here is the example:
@defcomp MyGreatComponent begin
myoutput = Variable(index=[time])
function run_timestep(p, v, d, t)
if mytest
v.myoutput[t] = 1
else
v.myoutput[t] = 0
end
end
end
which gets formatted as:
@defcomp MyGreatComponent begin
myoutput = Variable(index=[time])
function run_timestep(p, v, d, t)
if mytest
v.myoutput[t] = 1
else
v.myoutput[t] = 0
end
end
end
There are a bunch of indentation oddities in how DocumentFormat.jl works on Mimi models (see https://github.com/openmodels/MimiPAGE2020.jl/pull/70), but this seems to be one of the easier ones to isolate (actual code in src/compute_scc.jl).
DocumentFormat.jl
does not seem to recognize function definitions as indent-needing blocks when they are contained within other begin blocks (or maybe just macro begin blocks?). The example is from the Mimi.jl framework, where this is common.Here is the example:
which gets formatted as:
There are a bunch of indentation oddities in how
DocumentFormat.jl
works on Mimi models (see https://github.com/openmodels/MimiPAGE2020.jl/pull/70), but this seems to be one of the easier ones to isolate (actual code insrc/compute_scc.jl
).