formatting should preserve newlines introduced by the user
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
**Describe the bug**
formatting should preserve newlines introduced by the user instead of trying to minimize new lines.
**To Reproduce**
Consider the following code (a):
```
assert_eq(
downcast(HF16::EXP_SIZE, HF16::FRACTION_SIZE>(
F32 { sign: u1:0, bexp: u8:0b0000_0000, fraction: u23:0b000_0000_0000_0000_0000_0000 },
u23:0), HF16 { sign: u1:0, bexp: u5:0, fraction: u10:0 });
```
And introducing new lines for readability (b):
```
assert_eq(
downcast(
F32 { sign: u1:0, bexp: u8:0b0000_0000, fraction: u23:0b000_0000_0000_0000_0000_0000 },
u23:0
),
HF16 { sign: u1:0, bexp: u5:0, fraction: u10:0 }
);
```
Will result in the code being always reformatted to (a).
**Expected behavior**
I would expect the code to stay formatted as (b).
Contributor guide
Assessment
This issue has not been assessed yet.