Update style-guide to use new style

This commit is contained in:
Denton Liu 2016-08-24 15:27:46 -04:00
parent fb7836d87b
commit f1e6bc2eaa

View File

@ -273,17 +273,17 @@ No::
})); }));
For ``if`` blocks which have an ``else`` or ``else if`` clause, the ``else`` should be For ``if`` blocks which have an ``else`` or ``else if`` clause, the ``else`` should be
placed on it's own line following the previous closing parenthesis. The placed on the same line as the ``if``'s closing brace. This is an exception compared
parenthesis for the else block should follow the same rules as the other to the rules of other block-like structures.
conditional control structures.
Yes:: Yes::
if (x < 3) { if (x < 3) {
x += 1; x += 1;
} } else if (x > 7) {
else {
x -= 1; x -= 1;
} else {
x = 5;
} }
@ -296,7 +296,8 @@ No::
if (x < 3) { if (x < 3) {
x += 1; x += 1;
} else { }
else {
x -= 1; x -= 1;
} }