From b6fd6ddc996af702071bee7b8cb75976ae1bc3f3 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Fri, 6 May 2016 10:36:32 -0400 Subject: [PATCH] Change whitespace section to include exception For single-line functions, some whitespace padding makes the functions slightly more readable. --- docs/style-guide.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/style-guide.rst b/docs/style-guide.rst index a6582b1b6..9f1bcad53 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -155,7 +155,7 @@ Whitespace in Expressions Avoid extraneous whitespace in the following situations: -Immediately inside parenthesis, brackets or braces. +Immediately inside parenthesis, brackets or braces, with the exception of single-line function declarations. Yes:: @@ -165,6 +165,10 @@ No:: spam( ham[ 1 ], Coin( { name: "ham" } ) );` +Exception:: + + function singleLine() { spam(); } + Immediately before a comma, semicolon: Yes::