-
Notifications
You must be signed in to change notification settings - Fork 217
Feature request: preserve more blank lines in function body #1047
Copy link
Copy link
Closed
Labels
Description
With option sequence-blank-line = preserve-one (added by #814), blank lines in sequences are preserved as expected, but other blank lines in function body are still "eaten".
For example (code adapted from Cohttp example):
let async_main =
let* resp, raw_body = Client.get (Uri.of_string "https://api.github.com/") in
let* body = Body.to_string raw_body in
let code = resp |> Response.status |> Code.code_of_status in
Printf.printf "Status: %d\n" code;
Printf.printf "Body: %s\n" body;
Lwt.return ()becomes
let async_main =
let* resp, raw_body = Client.get (Uri.of_string "https://api.github.com/") in
let* body = Body.to_string raw_body in
let code = resp |> Response.status |> Code.code_of_status in
Printf.printf "Status: %d\n" code;
Printf.printf "Body: %s\n" body;
Lwt.return ()It would be great if such blank lines are left intact, so that some blocks of logic can "stand out" by keeping "distance" from other blocks.
Reactions are currently unavailable