1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/lib/action_view
Joel Hawksley 36b01da797 Do not add newlines when annotating rendered views
When rendering a view with annotate_rendered_view_with_filenames
enabled, we were inserting newlines after the BEGIN and END
comments. These newlines are not ideal in some use cases, such
as rendering templates to strings that are then passed around
our application.

As the newlines were added for aesthetic purposes, we think it
makes sense to remove them so that rendered template strings do
not contain extraneous newlines.

As a result of removing these newlines, the annotations
no longer affect the reporting of template error on the correct
line, as addressed in #38950. As such, we've reverted those
changes as well.

Co-authored-by: Chris Gavin <chrisgavin@github.com>
2020-10-06 11:29:36 -06:00
..
helpers Ensure tag.with_options({}).p builds a <p> 2020-10-05 18:41:49 -04:00
locale
renderer ✂️ [ci skip] 2020-09-16 09:52:10 +09:00
tasks
template Do not add newlines when annotating rendered views 2020-10-06 11:29:36 -06:00
testing Simplify FixtureResolver to reuse filtering logic 2020-02-24 16:22:58 -08:00
base.rb Remove unused @cache_hit Hash assignment 2020-09-13 10:40:28 +02:00
buffers.rb
cache_expiry.rb Reduce allocations in action_view cache expiry 2020-05-22 18:38:56 -04:00
context.rb Remove redundant @virtual_path variable 2020-05-26 15:53:11 -04:00
dependency_tracker.rb Prefer no allocation start/end_with? over String#[] == 2020-05-29 10:20:13 +09:00
digestor.rb Skip interpolated strings in AV::Digestor 2020-05-17 15:06:17 -07:00
flows.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
gem_version.rb
helpers.rb
layouts.rb Avoid extra string allocation in the methods generated by eval 2020-03-10 17:43:35 +09:00
log_subscriber.rb add additional instrumentation block for ActionView layout rendering 2020-05-01 19:15:54 -07:00
lookup_context.rb Merge pull request #37928 from CGA1123/fix-race-in-action-view 2019-12-12 22:47:30 +01:00
model_naming.rb
path_set.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
railtie.rb Unify raise_on_missing_translations for views and controllers 2020-05-20 02:42:59 +03:00
record_identifier.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
rendering.rb update from PR #36222 2020-02-12 13:31:43 -05:00
routing_url_for.rb URL helper methods are public 2020-10-02 14:20:58 +09:00
template.rb Do not add newlines when annotating rendered views 2020-10-06 11:29:36 -06:00
test_case.rb Avoid module_eval on helpers from AV::TestCase 2020-09-02 15:55:01 -07:00
unbound_template.rb Fix Class#new + keyword arguments warnings 2019-09-09 02:35:59 +09:00
version.rb
view_paths.rb Stop reopening ClassMethods and merge definitions 2019-08-19 00:35:23 +09:00