Skip to content
  • Joel Hawksley's avatar
    36b01da7
    Do not add newlines when annotating rendered views · 36b01da7
    Joel Hawksley authored
    
    
    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: default avatarChris Gavin <chrisgavin@github.com>
    36b01da7
    Do not add newlines when annotating rendered views
    Joel Hawksley authored
    
    
    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: default avatarChris Gavin <chrisgavin@github.com>
Loading