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

}else{ is converted to }else { #16

Open
davidaurelio opened this issue Dec 7, 2011 · 3 comments
Open

}else{ is converted to }else { #16

davidaurelio opened this issue Dec 7, 2011 · 3 comments

Comments

@davidaurelio
Copy link

With the default settings, syntax coverts

if(a){
}else if(b){
}else{
}

to

if(a) {
}else if(b) {
}else {
}

whereas it should be

if(a) {
} else if(b) {
} else {
}
@seidtgeist
Copy link
Owner

@klipstein YOU BREAK IT YOU FIX IT!

@klipstein
Copy link
Collaborator

atm the syntux plugin does not touch the right side of the closing brace at all, because it often led to results with too much spacing.

another thing to consider is, if syntux should convert

if(a) {
}else if(b) {
}else {
}

into:

if(a) {
}
else if(b) {
}
else {
}

@davidaurelio
Copy link
Author

I guess that should be configurable. When testing, also keep in mind the

do {
  stuff();
} while (something);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants