Fix trailing whitespace generation

Change-Id: I03dcd42bc5008fbc98ecab56268bd2625013ed8e
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>