Skip to content

[BUG] Incorrect end-of-line formatting for inline comments in list items #126

@decioferreira

Description

@decioferreira

Given the following formatted source code:

module Main exposing (..)


fn =
    [ 1 -- comment 1
    , 2 -- comment 2
    ]

The guida format command incorrectly formats it to the following:

module Main exposing (..)


fn =
    [ 1

    -- comment 1
    , 2

    -- comment 2
    ]

This relates to the eol info available for each item within the list: https://github.com/guida-lang/compiler/blob/master/src/Common/Format/Render/Box.elm#L2063

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions