This release should be used in conjunction with Rejoice! The release you've all been waiting for. This fixes bring three major quality-of-life improvements when using Reason's formatter, Your empty lines will now be preserved when you format your code! Multiple lines still collapse into one in most cases. This also mean that those awkward, forced new lines refmt previously inserted between e.g. top-level statements are now gone too (unless you insert them yourself). Here's an example snippet where whitespaces are preserved as-is: This change was very complex to implement; please thank Iwan, our Ever gotten those cryptic syntax errors when you write this? We now gracefully accept this! No more semicolon syntax errors. However, for good measure, Because we're hesitant to recommend the former for now. Under the current syntax, some semicolons are still hard to remove completely. We'll keep working on this; in the meantime, do write in the latter style. If you forget a semicolon, This improvement is made by Fred (Merlin, Reason 3, and many others). Another very challenging change. Note that to compile to the correct unicode string to JavaScript, you'd still need to use BuckleScript's Again, by Fred. Thanks! As always, full list of changes here. Enjoy!bs-platform 3.1.4.refmt.Whitespace Tuning
let confName = "Reason Conf";
let month = "May";
let year = "2018";
let location = Some("Vienna");
module Venue = {
let secretCode = c =>
switch (c) {
| 0 => "Turn on the mic"
| 1 => "Turn off the mic"
| 3 => "Start the slides"
| _ => "Talk to organizer"
};
/* important, grouped let statements */
let venuePassword = 123;
let contact = ["ryyppy", "nikgraf", "okonetchnikov"];
};
refmt expert.Semicolon Relaxation
let a = 1
let b = 2
refmt will still print it into:let a = 1;
let b = 2;
refmt will add it back.Unicode String Printing
let message = "Hi! Unicode formats correctly now. Sorry for the wait 😅"
{js|foo|js} interpolation feature. We'll try to unify the effort here.