reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.08k stars 425 forks source link

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

Open feihong opened 8 months ago

feihong commented 8 months ago

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