When the config option for match_arm_blocks is set to false, the formatter adds additional whitespace which causes errors saying: 'error[internal]: left behind trailing whitespace'
For example:
match pos_iter.peek()
{
Some(pos) if pos.0 != 0 =>
add_paragraphs_to_map(&doc[0..pos.0], 0, current_level, &mut paragraphs),
None => add_paragraphs_to_map(doc, 0, current_level, &mut paragraphs),
_ => (),
}
// becomes
match pos_iter.peek()
{
Some(pos) if pos.0 != 0 =>
add_paragraphs_to_map(&doc[0..pos.0], 0, current_level, &mut paragraphs),
None => add_paragraphs_to_map(doc, 0, current_level, &mut paragraphs),
_ => (),
}
This issue was discussed briefly in Discord, and confirmed to be reproducible on master as well
Most helpful comment
This issue was discussed briefly in Discord, and confirmed to be reproducible on master as well