When using minted in a .dtx file with l3doc in any way one will lose syntax highlighting as shown below (where the first and fourth segment are minted outputs and the second and third verbatim):
You see that either some tokens are gobbled from the beginning (verbatim and minted) or all code is shown, but not highlighted (verbatim and minted).
Question: How to fix that behavior?
MWE:
% \iffalse meta-comment
% License here
%<*driver>
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
\expandafter\begingroup
\fi
\input l3docstrip.tex
\askforoverwritefalse
\preamble
\endpreamble
\postamble
\endpostamble
\generate{\file{test.sty}{\from{test.dtx}{pkg,cfg}}}
\ifx\fmtname\nameofplainTeX
\expandafter\endbatchfile
\else
\expandafter\endgroup
\fi
%</driver>
%
%<*driver|class>
\RequirePackage{expl3}
%</driver|class>
%
%<*driver>
\documentclass{l3doc}
\usepackage{minted}
\begin{document}
\DocInput{test.dtx}
\end{document}
%</driver>
% \fi
%\iffalse
%<*driver>
%\fi
\begin{minted}{latex}
\begin{testme}
\item{example} Mustermann
\end{testme}
\end{minted}
\begin{verbatim}
\begin{testme}
\item{example} Mustermann
\end{testme}
\end{verbatim}
%\iffalse
%</driver>
%\fi
% \begin{verbatim}
% \begin{testme}
% \item{example} Mustermann
% \end{testme}
% \end{verbatim}
% \begin{minted}{latex}
% \begin{testme}
% \item{example} Mustermann
% \end{testme}
% \end{minted}
% \endinput
This is not about using minted for the macrocode (see l3doc in combination with minted)

