Remove rendering glitches with for blocks.

Introduce rendering settings.  Set trim_blocks and keep_trailing_newline
to True.