Quixote source isn't colorized as Python

Create issue
Issue #6 resolved
Jean-Paul Calderone created an issue

http://twistedmatrix.com/documents/10.1.0/web/howto/resource-templates.html includes some Quixote template markup. It's colorized, because Quixote is just Python.

But, eg, http://buildbot.twistedmatrix.com/builds/sphinx-html-15665/projects/web/howto/resource-templates.html does not have the markup colorized. I suppose this is because Sphinx doesn't recognize the .rtl extension? But apparently this could be fixed by including a "language" directive on the "literalinclude" directive. This makes sense anyway, because the Lore markup says "py-listing" - explicitly denoting it is Python.

Comments (3)

  1. Kevin Horn repo owner

    the language option on the literalinclude directive doesn't seem to do it for some reason...will have to play around with it some more

  2. Kevin Horn repo owner

    Ok, some progress.

    Apparently Sphinx's syntax highlighting has problems with the "template" keyword. If you replace it with "def" the syntax highlighting works fine.

    I'm not sure why this should be, since Sphinx uses Pygments, and Pygments' command line tool `pygmentize`, as well as some tests scripts I wrote, seem to highlight this code just fine.

    I've got an email in to the sphinx-dev list to see if they can tell me what's going on.

  3. Log in to comment