mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-14 01:12:10 -05:00
Prevent double hyphens becoming en-dashes in literal code in the LaTeX output.
This commit is contained in:
1 parent
611fcf7112
commit
54c5eb4db0
2 files changed
+5
No files matched your search
@@ -1,6 +1,9 @@
|
||||
Release 0.5.2 (in development)
|
||||
==============================
|
||||
|
||||
* Prevent double hyphens becoming en-dashes in literal code in
|
||||
the LaTeX output.
|
||||
|
||||
* Open literalinclude files in universal newline mode to allow
|
||||
arbitrary newline conventions.
|
||||
|
||||
|
||||
@@ -978,7 +978,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
raise nodes.SkipNode
|
||||
|
||||
def visit_literal(self, node):
|
||||
self.no_contractions += 1
|
||||
content = self.encode(node.astext().strip())
|
||||
self.no_contractions -= 1
|
||||
if self.in_title:
|
||||
self.body.append(r'\texttt{%s}' % content)
|
||||
elif node.has_key('role') and node['role'] == 'samp':
|
||||
|
||||
Reference in new issue
Block a user