Skip to content

Refmt doesn't break the line when an extra long string occurs in switch branch #2727

Description

@feihong

Here's a piece of code to reproduce:

let a = None;
let thing =
  switch (a) {
  | None => "error"
  | Some(fahrenheit) => "Unreasonably long string string string stringgggggggggggggg"
  };

Expected:

let a = None;
let thing =
  switch (a) {
  | None => "error"
  | Some(fahrenheit) => 
    "Unreasonably long string string string stringgggggggggggggg"
  };

Melange playground link

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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