Skip to content

Multiline string literal in function call #320

Closed
@Gama11

Description

@Gama11

Describe the bug

This is a weird one, it seems like the formatter triggers wrapping at a specific string length, even though this is a multi-line string literal and the characters are thus not even in the same line? With one a less it doesn't happen.

Input file

class Main {
	public static function main() {
		animatedSprite.frames = FlxAtlasFrames.fromLibGdx(sourceSprite.pixels, '
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
');
	}
}

Broken output

class Main {
	public static function main() {
		animatedSprite.frames = FlxAtlasFrames.fromLibGdx(sourceSprite.pixels,
			'
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
');
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwrappingIncorrect or undesirable wrapping

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions