Skip to content

Commit

Permalink
Add \markdownMode value 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jun 26, 2022
1 parent 519a498 commit f36538e
Showing 1 changed file with 31 additions and 13 deletions.
44 changes: 31 additions & 13 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -8307,10 +8307,10 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% \begin{markdown}
%
% The \mdef{markdownOptionInputTempFileName} macro sets the filename of the
% temporary input file that is created during the conversion from markdown to
% plain \TeX{} in \mref{markdownMode} other than `2`. It defaults to
% \mref{jobname}`.markdown.in`. The same limitations as in the case of the
% \mref{markdownOptionHelperScriptFileName} macro apply here.
% temporary input file that is created during the buffering of markdown text
% from a \TeX{} source. It defaults to \mref{jobname}`.markdown.in`. The same
% limitations as in the case of the \mref{markdownOptionHelperScriptFileName}
% macro apply here.
%
% \end{markdown}
% \begin{macrocode}
Expand Down Expand Up @@ -14397,6 +14397,7 @@ following text:
% - `0` – Shell escape via the 18 output file stream
% - `1` – Shell escape via the Lua \luamref{os.execute} method
% - `2` – Direct Lua access
% - `3` – The \pkg{lt3luabridge} Lua package
%
% By defining the macro, the user can coerce the package to use a specific mode.
% If the user does not define the macro prior to loading the plain \TeX{}
Expand All @@ -14406,13 +14407,32 @@ following text:
%
% \end{markdown}
% \begin{macrocode}
\ifx\markdownMode\undefined
\ifx\directlua\undefined
\def\markdownMode{0}%
\else
\def\markdownMode{2}%
\fi
\fi
\ExplSyntaxOn
\cs_if_exist:NF
\markdownMode
{
\file_if_exist:nTF
{ lt3luabridge.tex }
{
\cs_new:Npn
\markdownMode
{ 4 }
}
{
\cs_if_exist:NTF
\directlua
{
\cs_new:Npn
\markdownMode
{ 2 }
}
{
\cs_new:Npn
\markdownMode
{ 0 }
}
}
}
% \end{macrocode}
% \begin{markdown}
%
Expand All @@ -14423,14 +14443,12 @@ following text:
%
% \end{markdown}
% \begin{macrocode}
\ExplSyntaxOn
\int_new:N
\g__luabridge_method_int
\int_gset:Nn
\g__luabridge_method_int
{ \markdownMode }
\ExplSyntaxOff
\input l3luabridge\relax
% \end{macrocode}
% \par
% \begin{markdown}
Expand Down

0 comments on commit f36538e

Please sign in to comment.