mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix :samp: latex tests.
This commit is contained in:
@@ -1469,7 +1469,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
self.verbatim += node.astext()
|
||||
else:
|
||||
text = self.encode(node.astext())
|
||||
self.body.append(educate_quotes_latex(text))
|
||||
if not self.no_contractions:
|
||||
text = educate_quotes_latex(text)
|
||||
self.body.append(text)
|
||||
def depart_Text(self, node):
|
||||
pass
|
||||
|
||||
|
||||
@@ -84,14 +84,14 @@ def test_inline():
|
||||
_html = ('<p><tt class="(samp )?docutils literal"><span class="pre">'
|
||||
'code</span> <span class="pre">sample</span></tt></p>')
|
||||
yield verify_re, '``code sample``', _html, r'\\code{code sample}'
|
||||
yield verify_re, ':samp:`code sample`', _html, r'\\samp{code sample}'
|
||||
yield verify_re, ':samp:`code sample`', _html, r'\\code{code sample}'
|
||||
|
||||
# interpolation of braces in samp and file roles (HTML only)
|
||||
yield (verify, ':samp:`a{b}c`',
|
||||
'<p><tt class="samp docutils literal"><span class="pre">a</span>'
|
||||
'<em><span class="pre">b</span></em>'
|
||||
'<span class="pre">c</span></tt></p>',
|
||||
'\\samp{abc}')
|
||||
'\\code{a\\emph{b}c}')
|
||||
|
||||
# interpolation of arrows in menuselection
|
||||
yield (verify, ':menuselection:`a --> b`',
|
||||
|
||||
Reference in New Issue
Block a user