Skip to content

Commit

Permalink
Reorganise whitespace in the vhost header and location header/footer.
Browse files Browse the repository at this point in the history
The current template inserts newlines after a location, which doesn't
seem logical; one can't assume there will always be more blocks that
follow. Therefore it is only logical to include the newline before a
new location block is inserted, which lends itself to the convention
of only prepending newlines to blocks, never appending them.
  • Loading branch information
cewood committed Nov 12, 2014
1 parent 2917a35 commit 123b14e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion templates/vhost/location_footer.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@
<%- end -%>
<% end -%>
}

3 changes: 2 additions & 1 deletion templates/vhost/location_header.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

location <%= @location %> {
<% if @internal -%>
internal;
Expand Down Expand Up @@ -52,4 +53,4 @@
<%- Array(@raw_prepend).each do |line| -%>
<%= line %>
<%- end -%>
<% end -%>
<% end -%>
1 change: 0 additions & 1 deletion templates/vhost/vhost_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,3 @@ server {

access_log <%= @access_log_real %>;
error_log <%= @error_log_real %>;

0 comments on commit 123b14e

Please sign in to comment.