mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2640: 1.4.2 LaTeX crashes if code-block inside warning directive
The subtle cause of the bug was that original Verbatim environment was used inside a minipage environment, and fancyvrb's code for checking when \end{Verbatim} is reached does not work if \@currenvir is minipage.
This commit is contained in:
parent
d4a9997a48
commit
cea3474ccc
@ -329,6 +329,8 @@
|
||||
\discretionary{\copy\Sphinxvisiblespacebox}{\Sphinxafterbreak}
|
||||
{\kern\fontdimen2\font}%
|
||||
}%
|
||||
% go around fancyvrb's check of @currenvir (for case of minipage below)
|
||||
\renewcommand*{\VerbatimEnvironment}{\xdef\FV@EnvironName{Verbatim}}%
|
||||
% Allow breaks at special characters using \PYG... macros.
|
||||
\Sphinxbreaksatspecials
|
||||
% The list environment is needed to control perfectly the vertical space.
|
||||
|
Loading…
Reference in New Issue
Block a user