Skip to content
Discussion options

You must be logged in to vote

Seems to be working as-intended, but there's a misalignment of expectations from the name kinda-sorta overpromising.

Mago is still a parse-and-reprint formatter and preserve-breaking-condition-expression only promises that, "when enabled [and existing breaks are detected], each boolean operator goes on its own line." It does not preserve the exact whitespace you use, just that there is some whitespace - of which Mago is opinionated about (see below).

The way this works, is that it checks if you want to preserve breaks. If you do, it checks if there's already a line break between the left paren and the beginning of your conditional expression (in your source). If there is, when it creates …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@cweiske
Comment options

@cweiske
Comment options

@cweiske
Comment options

@Kenneth-Sills
Comment options

Answer selected by cweiske
@cweiske
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants