mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Closes #1088: raise an "unsupported" error when trying to put a literal block in a footnote in latex
This commit is contained in:
@@ -1310,6 +1310,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
pass
|
||||
|
||||
def visit_literal_block(self, node):
|
||||
if self.in_footnote:
|
||||
raise UnsupportedError('%s:%s: literal blocks in footnotes are '
|
||||
'not supported by LaTeX' %
|
||||
(self.curfilestack[-1], node.line))
|
||||
self.verbatim = ''
|
||||
def depart_literal_block(self, node):
|
||||
code = self.verbatim.rstrip('\n')
|
||||
|
||||
Reference in New Issue
Block a user