gpoore / minted

minted is a LaTeX package that provides syntax highlighting using the Pygments library. Highlighted source code can be customized using fancyvrb.
1.74k stars 126 forks source link

Breaking line within \newmintinline throws error #376

Closed carlostome closed 3 weeks ago

carlostome commented 11 months ago

Using pdflatex -shell-escape on:

\documentclass{article}

\usepackage[]{minted}

\newmintinline[hs]{haskell}{}

\begin{document}
\hs\f x = x\
\hs\f x
= x\
\end{document}

causes the following error:

...
Runaway argument?
f x
! Forbidden control sequence found while scanning use of \FV@ReadVArg@Char@i.
<inserted text>
                \par
l.10 \hs\f x
...

I can reproduce this error using versions 2.7 and 2.8 of minted (with TexLive 2023 installed). However, using version 2.6 the above code compiles successfully.

(I'm not sure if this is a bug or an intended feature)

gpoore commented 3 weeks ago

This is fixed in the dev version of fvextra. A new fvextra release will be out in the next day or so.