Skip to content

Unfortunate comment intendation in if else block #253

Description

@saschatimme

Currently a comment in an if else block (resp. if elseif) before an else statement get's indented to the clause level:

if true
    return 2
# comment
else
    return 3
end
julia> print(format_text("""
           if true
               return 2
           # comment
           else
               return 3
           end
       """))
if true
    return 2
    # comment
else
    return 3
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    decisionUncertain if a change is warranted

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions