Permalink
Browse files

Merge pull request #184 from smic/empty_lines

[NEW] Remove unnecessary empty lines in the generated files. (Stephan Michels)
  • Loading branch information...
2 parents b8b57d1 + 4efa1c2 commit 928b83505089d71c1d8bb87513470dc471ce58ca @rentzsch committed Jan 8, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 mogenerator.m
View
@@ -929,6 +929,12 @@ - (int)application:(DDCliApplication*)app runWithArguments:(NSArray*)arguments {
NSString *generatedHumanH = [humanH executeWithObject:entity sender:nil];
NSString *generatedHumanM = [humanM executeWithObject:entity sender:nil];
+ // remove unnecessary empty lines
+ generatedMachineH = [generatedMachineH stringByReplacingOccurrencesOfRegex:@"([ \t]*(\n|\r|\r\n)){2,}" withString:@"\n\n"];
+ generatedMachineM = [generatedMachineM stringByReplacingOccurrencesOfRegex:@"([ \t]*(\n|\r|\r\n)){2,}" withString:@"\n\n"];
+ generatedHumanH = [generatedHumanH stringByReplacingOccurrencesOfRegex:@"([ \t]*(\n|\r|\r\n)){2,}" withString:@"\n\n"];
+ generatedHumanM = [generatedHumanM stringByReplacingOccurrencesOfRegex:@"([ \t]*(\n|\r|\r\n)){2,}" withString:@"\n\n"];
+
NSString *entityClassName = [entity managedObjectClassName];
BOOL machineDirtied = NO;

0 comments on commit 928b835

Please sign in to comment.