diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2012-05-30 10:09:44 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2012-05-30 10:09:44 +0400 |
commit | e674d13eb1f829592b2f6884025fddaa14b46b46 (patch) | |
tree | c177469a5192e5a75ec2788089cb54af9168b600 /main/src | |
parent | f48669d1a323b5b7695408d14aab089b8df292a7 (diff) |
Fixed 'Bug 5406 - Header should not add trailing whitespace'.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs index e4560ed6cd..c34f26b240 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs @@ -73,6 +73,11 @@ namespace MonoDevelop.Ide.StandardHeader StringBuilder sb = new StringBuilder (policy.Text.Length); string[] lines = policy.Text.Split ('\n'); foreach (string line in lines) { + if (string.IsNullOrWhiteSpace (line)) { + sb.Append (cmt.TrimEnd ()); + sb.Append (eolMarker); + continue; + } sb.Append (cmt); sb.Append (line); sb.Append (eolMarker); |