Update (27 November 2021): This issue is now fixed in fancyvrb
4.1. In version 4.0, fancyvrb
changed the handling of the lastline
option so that using lastline=
hides all lines (nothing is displayed). However, this also caused lastline
used with no argument to hide all lines. That is, the lastline
default was to hide all lines. minted
uses lastline
(default argument) as part of the highlighting process for minted
environments, so these environments stopped displaying anything with fancyvrb
4.0. Everything works correctly again with fancyvrb
4.1, which switches lastline
(default argument) back to the original behavior.
The relevant change seems to be \@ne
-> \z@
on fancyvrb.sty
line 225. This causes minted
to write nothing to the temp file it uses for highlighting code, instead of writing the code.
Everything can be switched back to the original behavior, fixing minted
, by adding this to the preamble:
\makeatletter
\def\FV@DefineFindStop{%
\ifx\FancyVerbStopString\relax
\ifnum\FancyVerbStopNum<\@ne
\let\FV@FindStartStop\FV@@PreProcessLine
\else
\let\FV@FindStartStop\FV@FindStopNum
\fi
\else
\let\FV@FindStartStop\FV@FindStopString
\fi}
\makeatother
At this point (22 November 2021), I am still unsure whether this change in fancyvrb
was fixing an old bug (in which case minted
should adapt), introducing a new bug, or defining new behavior.
fancyvrb
and I see the issue. Too bad! Time to downgrade.