Skip to content

Commit

Permalink
Closes: sphinx-doc#8807 by letting sphinxadmonition step a counter
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Feb 7, 2021
1 parent d1f8c8f commit 16e3a93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -1686,8 +1686,11 @@
\csname\@backslashchar color@#2\endcsname }
% the main dispatch for all types of notices
% work around a problem with todo extension triggering usage of \label
% without a proper anchor set-up via ref-stepping a counter (or \phantomsection)
\newcounter{sphinxadmonition}
\newenvironment{sphinxadmonition}[2]{% #1=type, #2=heading
\refstepcounter{sphinxadmonition}% in case extension triggers \label usage
% can't use #1 directly in definition of end part
\def\spx@noticetype {#1}%
% set parameters of heavybox/lightbox
Expand Down

0 comments on commit 16e3a93

Please sign in to comment.