Skip to content

Error when formatting sigils containing newlines #369

@gustawlippa

Description

@gustawlippa

When trying to format code containing multiline sigils:

-module(test).

-export([hello/0]).

hello() ->
    ~"Hello
             there".

An error is reported:

test.erl:5:1: formatter result not equivalent. Please report this bug.

Hence I'm reporting the error - not sure how popular this sigil usage is though 😅

However, it's legal Erlang code. It compiles without warnings, and the sigil is properly handled:

1> test:hello().
<<"Hello\n             there">>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions