jgm/pandoc — pull request #1207 by mpickering (2014-03-27 20:52:04+00:00)
Title: Fix #1162, #1175 and rewrite textile and HTML backend to use the builder

This patch contributes several interconnected improvements.

1. The Textile reader now uses the builder to construct the AST
2. As a result, the `smartPunctuation` function needed to be altered to return an Inlines element not an Inline element.
3. The HTML reader also relied on the `smartPunctuation` function and hence I also rewrote that to use the builder.
4. Other readers are altered to reflect this change to `smartPunctuation`.
4. A fix to #1175 is included, the behaviour is detailed below.
5. A better fix to #1162 is also contributed which works on Inlines rather than [Inline]
6. Tests are updated in order to reflect the difference between `meld` and `normalizeSpaces`.

All tests passed when the line which combined adjacent spaces was commented out of the meld definition.

Behaviour of #1175 is as dicussed.

(a) The inline markup must be either at the start of the line, inside another inline markup or preceeded by whitespace.
(b) The markup must not be immediately followed by an alphanumeric character.
(c) The markup cannot cross a paragraph boundary.