Skip to content
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

Multiline string literal in function call #320

Closed
Gama11 opened this issue Feb 6, 2019 · 0 comments
Closed

Multiline string literal in function call #320

Gama11 opened this issue Feb 6, 2019 · 0 comments
Labels
bug Something isn't working wrapping Incorrect or undesirable wrapping

Comments

@Gama11
Copy link
Member

Gama11 commented Feb 6, 2019

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
');
	}
}
@Gama11 Gama11 added bug Something isn't working wrapping Incorrect or undesirable wrapping labels Feb 6, 2019
AlexHaxe added a commit to AlexHaxe/haxe-formatter that referenced this issue Feb 16, 2019
fixed complex conditional typedef, fixes HaxeCheckstyle#336
fixed parameter wrapping with multiline string, HaxeCheckstyle#320
AlexHaxe added a commit that referenced this issue Feb 16, 2019
* fixed braceless if body with conditional, fixes #328
* fixed complex conditional typedef, fixes #336
* fixed parameter wrapping with multiline string, #320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wrapping Incorrect or undesirable wrapping
Projects
None yet
Development

No branches or pull requests

2 participants