New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leave empty blocks on the same line #170
Comments
dsherret
changed the title
Leave empty blocks alone
Leave empty blocks on the same line
Jan 30, 2020
dsherret
referenced
this issue
in dprint/dprint
Jan 30, 2020
@dsherret try {} catch {} dprint output: try {
} catch {
} Prettier output: try {
} catch {} I know this seems arbitrary 😅, designing a formatter must be hard. I think Prettier's logic is add a new line for blocks which have no reason to be empty ( Using options: dprint::ConfigurationBuilder::new()
.line_width(80)
.indent_width(2)
.next_control_flow_position(dprint::NextControlFlowPosition::SameLine)
.binary_expression_operator_position(dprint::OperatorPosition::SameLine)
.build() |
@nayeemrmn Thanks again! Opened dprint/dprint#77 |
dsherret
referenced
this issue
in dprint/dprint
Jun 6, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example:
The text was updated successfully, but these errors were encountered: