From e3232958e0639c87d84869d3b09a7bea10671e5c Mon Sep 17 00:00:00 2001 From: jfbu Date: Wed, 8 Jun 2016 11:10:19 +0200 Subject: [PATCH] Fix #2632 (again). This is a better way as it also handles the case of warning directive as first in item of a labeled list. --- sphinx/texinputs/sphinx.sty | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index fc3d4558b..f556b81a3 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -536,9 +536,13 @@ \ifSphinx@inframed \noindent\begin{minipage}{\linewidth} \else - \vspace{\parskip} + % handle case where notice is first thing in a list item (or is quoted) + \if@inlabel + \noindent\par\vspace{-\baselineskip} + \else + \vspace{\parskip} + \fi \fi - \global\@newlistfalse \MakeFramed {\Sphinx@inframedtrue \advance\hsize-\width \@totalleftmargin\z@ \linewidth\hsize % minipage initialization copied from LaTeX source code.