Commits

Anonymous committed 4e8cf77

Make parsed-literal blocks work as expected.

  • Participants
  • Parent commits 7005898

Comments (0)

Files changed (2)

 
 * sphinx.builder: The WebHTMLBuilder is now called PickleHTMLBuilder.
 
+* sphinx.htmlwriter: Make parsed-literal blocks work as expected,
+  not highlighting them via Pygments.
+
 
 Release 0.1.61798 (Mar 23, 2008)
 ================================

sphinx/htmlwriter.py

 
     # overwritten
     def visit_literal_block(self, node):
+        if node.rawsource != node.astext():
+            # most probably a parsed-literal block -- don't highlight
+            return BaseTranslator.visit_literal_block(self, node)
         lang = self.highlightlang
         linenos = node.rawsource.count('\n') >= self.highlightlinenothreshold - 1
         if node.has_key('language'):