Convert generator to the simple format
Prevent trailing whitespace