@ -282,7 +282,7 @@ function spaces_around_operators(ctx::Context, node::JuliaSyntax.GreenNode)
end
function spaces_around_assignments(ctx::Context, node::JuliaSyntax.GreenNode)
if !(is_assignment(node) && !JuliaSyntax.is_trivia(node))
if !(is_assignment(node) && !is_leaf(node) )
return nothing
# for-loop nodes are of kind K"=" even when `in` or `∈` is used so we need to
@ -173,6 +173,9 @@ end
op == "in" && sp == "" && continue
@test format_string("for i$(sp)$(op)$(sp)1:10\nend\n") == "for i $(op) 1:10\nend\n"
# Quoted assignment operators
@test format_string(":(=)") == ":(=)"
@test format_string(":(+=)") == ":(+=)"
@testset "whitespace around <: and >:, no whitespace around ::" begin