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

Empty lines are not ignored for enum abstract vars #672

Closed
RblSb opened this issue May 25, 2023 · 0 comments
Closed

Empty lines are not ignored for enum abstract vars #672

RblSb opened this issue May 25, 2023 · 0 comments
Labels
bug Something isn't working emptylines missing or incorrect empty line

Comments

@RblSb
Copy link
Contributor

RblSb commented May 25, 2023

Describe the bug

Empty line in enum abstract is removed between G/B vars (properties in non-minimized code).
Does not happen in Main class.

Input file

enum abstract Color(Int) {
	/**
	 * Contains a float representing the green color component.
	 */
	var G = 0;

	/**
	 * Contains a float representing the blue color component.
	 */
	var B = 0;
}

class Main {
	/**
	 * Contains a float representing the green color component.
	 */
	var G = 0;

	/**
	 * Contains a float representing the blue color component.
	 */
	var B = 0;

	static function main() {}
}

Optional: hxformat.json

{
	"emptyLines": {
		"beforeDocCommentEmptyLines": "ignore",
		"afterFieldsWithDocComments": "ignore",
		"enumAbstractEmptyLines": {
			"existingBetweenFields": "keep"
		}
	}
}
@AlexHaxe AlexHaxe added bug Something isn't working emptylines missing or incorrect empty line labels May 26, 2023
AlexHaxe added a commit to AlexHaxe/haxe-formatter that referenced this issue Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working emptylines missing or incorrect empty line
Projects
None yet
Development

No branches or pull requests

2 participants