netcarver/textile — pull request #111 by gocom (2013-08-24 19:07:32+00:00)
Title: Preserve newlines: fixes collapsing empty lines within notextile, bc and pre blocks

This PR makes sure Textile's block parsers preserves newlines instead of using hard-coded LFLF between extended blocks and single LF between lines.

Instead Parser::blocks() renders visible whitespace as it was given. This fixes whitespace rendering within such block tags as 'bc.', 'notextile.' and 'pre.', where the whitespace should be preserved. Whitespace is still normalized so that it works on every target platform.

Currently any empty lines used in a Textile markup's block tags would collapse into one. Three empty lines within pre, bc or notextile would be rendered as one LF. In bc. there would be a single empty line due to line-wrappers, but inside notextile and pre there wouldn't be an empty line at all -- just single LF. The functionality inside pre. itself is side-affect from line wrapping, and without code tags it would result in same single LF.

After this any empty lines used in a code block will be returned properly instead of the lines collapsing into one.

This PR fixes issue #109