jgm/pandoc — pull request #1594 by jkr (2014-08-31 20:10:06+00:00)
Title: Item fix

As discussed in #1588, this inserts a non-breaking space before headers when they are the first block in a list item. This is overly general, since we're only concerned with the first item, and only then if the list follows immediately upon a header. But this change will be invisible in typeset output (the header will always force a par break, so we won't see the space), so we might as well just insert the space in general.

Note that this construction is rare, and fairly nonsensical in LaTeX. But it's sometimes seen in html, which will change the meaning of lists and headers through css (for, say, a nav bar). And it is valid.This will prevent a LaTeX error when we encounter this structure.