Merge pull request #5177 from jfbu/5176_latex_index_special_chars

Fix #5176
This commit is contained in:
Jean-François B 2018-07-16 09:13:52 +02:00 committed by GitHub
commit d35cb7e202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,7 @@ Bugs fixed
sorting
* #5139: autodoc: Enum argument missing if it shares value with another
* #4946: py domain: rtype field could not handle "None" as a type
* #5176: LaTeX: indexing of terms containing ``@``, ``!``, or ``"`` fails
* #5161: html: crashes if copying static files are failed
* #5167: autodoc: Fix formatting type annotations for tuples with more than two
arguments

View File

@ -1963,6 +1963,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
value = self.encode(value)
value = value.replace(r'\{', r'{\sphinxleftcurlybrace}')
value = value.replace(r'\}', r'{\sphinxrightcurlybrace}')
value = value.replace('"', '""')
value = value.replace('@', '"@')
value = value.replace('!', '"!')
return value
if not node.get('inline', True):