summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty33
1 files changed, 29 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty
index 1fa63587466..1006f44b2fd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty
@@ -15,7 +15,7 @@
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-\LWR@ProvidesPackagePass{minted}[2022/12/12]
+\LWR@ProvidesPackagePass{minted}[2023/09/12]
\renewcommand{\setminted}[2][]{%
\ifthenelse{\equal{#1}{}}%
{\setkeys{minted@opt@g}{%
@@ -39,7 +39,6 @@
#2,
mathescape=false,breaklines,texcomments=false,highlightlines={}% lwarp
}}}
-
\xpatchcmd{\RobustMintInlineProcess}
{\setkeys{minted@opt@cmd}{#1}}
{%
@@ -47,6 +46,9 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -58,6 +60,9 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -69,6 +74,9 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -79,12 +87,13 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{inputminted}}
-
-
\renewenvironment{minted@snugshade*}[1]%
{%
\colorlet{shadecolor}{#1}%
@@ -94,6 +103,22 @@
\end{snugshade*}%
}
+\xpatchcmd{\minted@input}
+ {\input{#1}}
+ {%
+ \LWR@minted@overrides%
+ \input{#1}%
+ }
+ {}
+ {\LWR@patcherror{minted}{minted@input}}
+
+\newcommand*{\LWR@minted@overrides}{
+\def\PYGZam{\char`\&}
+\def\PYGZlt{\char`\<}
+\def\PYGZgt{\char`\>}
+\def\PYGZsq{\char`\'}
+}
+
\endinput
%%
%% End of file `lwarp-minted.sty'.