[Python-checkins] r59385 - doctools/trunk/sphinx/builder.py doctools/trunk/sphinx/highlighting.py doctools/trunk/sphinx/latexwriter.py
georg.brandl
python-checkins at python.org
Thu Dec 6 11:08:17 CET 2007
Author: georg.brandl
Date: Thu Dec 6 11:08:16 2007
New Revision: 59385
Modified:
doctools/trunk/sphinx/builder.py
doctools/trunk/sphinx/highlighting.py
doctools/trunk/sphinx/latexwriter.py
Log:
Fix highlighting code a bit.
Modified: doctools/trunk/sphinx/builder.py
==============================================================================
--- doctools/trunk/sphinx/builder.py (original)
+++ doctools/trunk/sphinx/builder.py Thu Dec 6 11:08:16 2007
@@ -673,7 +673,7 @@
components=(docwriter,)).get_default_values()
# XXX get names of toplevels automatically?
- for docname in ["c-api"]:#, "distutils", "documenting", "extending",
+ for docname in ["library"]:#, "distutils", "documenting", "extending",
#"howto", "install", "library", "reference",
#"tutorial", "using"]:
# XXX whatsnew missing
@@ -693,7 +693,7 @@
self.filenames = [indexfile]
print "processing", indexfile
def process_tree(tree):
- #tree = tree.deepcopy()
+ #tree = tree.deepcopy() XXX
for toctreenode in tree.traverse(addnodes.toctree):
newnodes = []
includefiles = map(str, toctreenode['includefiles'])
Modified: doctools/trunk/sphinx/highlighting.py
==============================================================================
--- doctools/trunk/sphinx/highlighting.py (original)
+++ doctools/trunk/sphinx/highlighting.py Thu Dec 6 11:08:16 2007
@@ -61,7 +61,7 @@
if dest == 'html':
return '<pre>' + cgi.escape(source) + '</pre>\n'
else:
- return source
+ return highlight(source, lexers['none'], lfmter)
if not pygments:
return unhighlighted()
if lang == 'python':
Modified: doctools/trunk/sphinx/latexwriter.py
==============================================================================
--- doctools/trunk/sphinx/latexwriter.py (original)
+++ doctools/trunk/sphinx/latexwriter.py Thu Dec 6 11:08:16 2007
@@ -600,7 +600,7 @@
def visit_Text(self, node):
if self.verbatim is not None:
- self.verbatim += node.astext()
+ self.verbatim += node.astext().replace('@', '@@')
else:
self.body.append(self.encode(node.astext()))
def depart_Text(self, node):
More information about the Python-checkins
mailing list