-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Remove extra empty line #30022
Remove extra empty line #30022
Conversation
r? @eileencodes (@rails-bot has picked a reviewer for you, use r? to override) |
@@ -1,6 +1,6 @@ | |||
source 'https://rubygems.org' | |||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |||
ruby <%= "'#{RUBY_VERSION}'" %> | |||
ruby <%= "'#{RUBY_VERSION}'" -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this works for bundle exec rails new destination
, since that includes a gem.comment
(# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
), if you do bundle exec rails new destination --dev
with your change, there's no empty line at all after ruby '2.4.1'
. Can you instead remove the empty line following <% if gem.comment -%>
? It then gives a single blank line in both cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty line following <% if gem.comment -%>
is required when commenting in a loop.
If there is no empty line, the comment will collapse as shown below.
# Use sqlite3 as the database for Active Record
gem 'sqlite3'# Use Puma as the app server
gem 'puma', '~> 3.7'# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'# See https://github.com/rails/execjs#readme for more supported runtimes
So, instead of remove this emptyline, I fixed by adding a empty line to the beginning.
I kinda like it with the extra newline to separate the setup and the raw gems/groups below. What I'd want here is one newline before the |
A Gemfile is still ruby, and rails coding style disallows more than one empty line in a row. I agree with the change. |
35d7e57
to
6721960
Compare
Looks good. I added. |
before
after