Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Along with the improvements made in #503452: Retool exports to drill down properly, there is one line that will add trailing whitespace upon export (noticed it due to features + git).
Potentially the $indent could go after the \n, but for code folding purposes I rather like having each display start the line.
Patch is against DRUPAL-6--3, but applies properly (with fuzz) to DRUPAL-7--3.
Comment | File | Size | Author |
---|---|---|---|
views-export_whitespace.patch | 1.01 KB | tim.plunkett | |
Comments
Comment #1
dawehnerI can't reproduce your problem with the export.
Comment #2
tim.plunkettAh.
In includes/views.inc, in export(), the default $indent is ''.
However, in views_views_exportables(), $indent is ' ' (two spaces).
So views export has NO indents, whereas other modules like features would have two spaces.
And as the patch points out, the spaces are placed BEFORE the linebreak, resulting in trailing whitespace.
Comment #3
tim.plunkettPatch still applies.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedI think $indent does have to go after the newline -- the $indent is meant to allow things to be exported inside of other things, and breaking that indent for a line breaks the readability flow. Since this is trivial I made the change. COmmitted to all 3.x branches.