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.

CommentFileSizeAuthor
views-export_whitespace.patch1.01 KBtim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

I can't reproduce your problem with the export.

tim.plunkett’s picture

Ah.
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.

tim.plunkett’s picture

Priority: Minor » Normal

Patch still applies.

merlinofchaos’s picture

Status: Needs review » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.