Skip to content

Issue with persistent line break with fun("", {}) #378

@ColinFay

Description

@ColinFay

Description

Let's assume the following code with a persistent line break

list(
foo, bar)
# Which gets formatted as
list(
  foo,
  bar
)

If I switch bar for an expression, it's still formatted as expected:

list(
foo, {bar})
# gets formatted as
list(
  foo,
  {
    bar
  }
)

But if ever foo is a text string, the persistent line break is removed:

list(
"foo", {bar})
# gets formatted as
list("foo", {
  bar
})

only in cases where {} is the second argument:

list(
  "foo","bar",{bar}
)
# gets formatted as
list(
  "foo",
  "bar",
  {
    bar
  }
)

Is this an intended behavior?

Thanks.

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