getpelican/pelican — pull request #1334 by mattjesson (2014-04-28 13:35:24+00:00)
Title: Fix947

The commits in this branch are intended to fix issue 947.

AsciiDoc is now called with the "html5" backend unless otherwise specified by an `ASCIIDOC_OPTIONS` parameter. This allows Pygments to correctly highlight source blocks.

Because of a *quirk* with AsciiDoc's parsing of parameters I extract any `ASCIIDOC_OPTIONS` backend setting ("--backend=" or "-b") and pass this value as the backend parameter to `ad.execute()` - just to make sure the backend is properly set. In case AsciiDoc ever changes this behaviour in the future the `ASCIIDOC_OPTIONS` settings are still passed unmodified (as before) and Pelican should continue to work.

There is also a new test for the AsciiDoc reader to make sure source highlighting is happening when Pygments is chosen. Because the default AsciiDoc backend has changed I had to correct the two existing tests. The first produces sensible, but different, output in html5 mode; the other produces the same output but only because it's a test of `ASCIIDOC_OPTIONS` and it now asks for html4 (the previous default).