Reason: [refmt] Keep existing spacing between statements

Created on 11 Nov 2017  路  3Comments  路  Source: reasonml/reason

Input

let x = 1;
let y = 2;

let z = 3;

module A = {
  let x = 1;
  let y = 2;


  let z = 3;
};

Desired output

let x = 1;
let y = 2;

let z = 3;

module A = {
  let x = 1;
  let y = 2;

  let z = 3;
};

Actual output

let x = 1;

let y = 2;

let z = 3;

module A = {
  let x = 1;
  let y = 2;
  let z = 3;
};

Similar prettier example for reference: https://goo.gl/jVGeah

Most helpful comment

I'll make this a priority, with a bit of luck I can land this next week.

All 3 comments

@IwanKaramazow had some ideas about how to do this by looking at the binding original locations. I suggested maybe using ppx attributes to encode them but I realized that's probably not the best idea and his original approach is better.

I'll make this a priority, with a bit of luck I can land this next week.

This is done!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bluddy picture bluddy  路  3Comments

modlfo picture modlfo  路  4Comments

bobzhang picture bobzhang  路  3Comments

rickyvetter picture rickyvetter  路  3Comments

chenglou picture chenglou  路  3Comments