haxe-formatter icon indicating copy to clipboard operation
haxe-formatter copied to clipboard

Object literal detection issue

Open Gama11 opened this issue 5 years ago • 0 comments

This is not an object literal, just a block, but it respects the objectLiteralCurly rule for some reason. From https://github.com/openfl/openfl/pull/2186.

Input file

class Foo
{
	public static inline var sep = {
		#if windows
		"\\";
		#else
		"/";
		#end
	}
}

Optional: hxformat.json

{
	"lineEnds": {
		"leftCurly": "both",
		"objectLiteralCurly": {
			"leftCurly": "after"
		}
	}
}

Gama11 avatar May 17 '19 13:05 Gama11