mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1088: raise an "unsupported" error when trying to put a literal block in a footnote in latex
This commit is contained in:
parent
77d2a90f36
commit
41971a6617
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user