Skip to content

if wrapping takes two formatter runs #373

@Gama11

Description

@Gama11

Describe the bug

This takes two formatter runs to reach its "final form":

Input file

class Main {
	static function main() {
		{
			{
				var accessors = if ((read != null && write != null) && (read != "default" || write != "default")) '($read, $write)' else "";
			}
		}
	});
}}
class Main {
	static function main() {
		{
			{
				var accessors = if ((read != null && write != null)
					&& (read != "default" || write != "default")) '($read, $write)' else "";
			}
		}
	});
}}
class Main {
	static function main() {
		{
			{
				var accessors = if ((read != null && write != null) && (read != "default" || write != "default"))
					'($read, $write)'
				else
					"";
			}
		}
	});
}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsamelinebroken same line formattingunstableoutput changes with multiple formatting passeswrappingIncorrect or undesirable wrapping

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions