Skip to content
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

Do not add newlines when annotating rendered views #40346

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Do not add newlines when annotating rendered views #40346

merged 1 commit into from
Oct 7, 2020

Commits on Oct 6, 2020

  1. 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>
    joelhawksley and chrisgavin committed Oct 6, 2020
    Configuration menu
    Copy the full SHA
    36b01da View commit details
    Browse the repository at this point in the history