Skip to content

Styler breaks ranges at the start of pipes #76

@cschmatzler

Description

@cschmatzler

Versions

  • Elixir: 1.15.5-otp-26
  • Styler: 0.9.1

Example Input

start..23//step
|> Stream.drop_while(fn x -> x < hour end)

Current Behaviour

Output:

start
|> ..//(23, step)
|> Stream.drop_while(fn x -> x < hour end)

Styler

  1. moves the end of the range into the step
  2. moves the call to .. into a pipe, which is invalid syntax with
unexpected token: "." (column 10, code point U+002E)
    |
 22 |       |> ..//(23, step)

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