Skip to content

Commit

Permalink
Do not allocate new toks when a setup snipped is redefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jul 19, 2021
1 parent b43024f commit 438f075
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -10997,10 +10997,16 @@ pdflatex --shell-escape document.tex
% \end{markdown}
% \begin{macrocode}
\newcommand\markdownSetupSnippet[2]{%
\newtoks\next
\next={#2}%
\expandafter\let\csname markdownLaTeXSetupSnippet%
\markdownLaTeXThemeName#1\endcsname=\next}%
\@ifundefined
{markdownLaTeXSetupSnippet\markdownLaTeXThemeName#1}{%
\newtoks\next
\next={#2}%
\expandafter\let\csname markdownLaTeXSetupSnippet%
\markdownLaTeXThemeName#1\endcsname=\next
}{%
\csname markdownLaTeXSetupSnippet%
\markdownLaTeXThemeName#1\endcsname={#2}%
}}%
% \end{macrocode}
% \begin{markdown}
%
Expand Down

0 comments on commit 438f075

Please sign in to comment.