mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2026: LaTeX builder rais error if parsed-literal includes links
This commit is contained in:
parent
3f998a0096
commit
53cd2d4f3f
1
CHANGES
1
CHANGES
@ -8,6 +8,7 @@ Bugs fixed
|
||||
* Fix filenames were not shown on warnings of citations
|
||||
* Fix line numbers was not shown on warnings in LaTeX and texinfo builders
|
||||
* Fix line numbers was not shown on warnings of indecies
|
||||
* #2026: Fix LaTeX builder rais error if parsed-literal includes links
|
||||
|
||||
Release 1.3.4 (released Jan 12, 2016)
|
||||
=====================================
|
||||
|
@ -459,7 +459,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
'\\label{%s}' % self.idescape(id)
|
||||
|
||||
def hyperlink(self, id):
|
||||
return '{\\hyperref[%s]{' % self.idescape(id)
|
||||
return '{\\hyperref[%s]{' % self.hyperrefescape(id)
|
||||
|
||||
def hyperpageref(self, id):
|
||||
return '\\autopageref*{%s}' % self.idescape(id)
|
||||
@ -469,6 +469,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
encode('ascii', 'backslashreplace').decode('ascii').\
|
||||
replace('\\', '_')
|
||||
|
||||
def hyperrefescape(self, ref):
|
||||
return self.idescape(ref).replace('-', '\\string-')
|
||||
|
||||
def babel_renewcommand(self, builder, command, definition):
|
||||
if builder.config.language == 'ja':
|
||||
babel_prefix = ''
|
||||
|
Loading…
Reference in New Issue
Block a user