summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index 057b93d8acf..fd300d5ee45 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -271,6 +271,26 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\doOption}
+% As \textsf{DocStrip} processes each line, a line starting with |%<| triggers (via \cs{checkOption} above) a look-ahead to establish the type of guard encountered.
+% Of the branching possibilities, if we ignore the deprecated |+| and |-| and choose to do no replacement for the special verbatim mode, the only branch that we need to alter is that for a single-line guard such as\\ | %<stats> ...stats-only code to include...|.
+% The original definition of \cs{doOption} did not use \cs{inLine} but I believe we're safe to do so.
+% \begin{macrocode}
+\def\doOption#1>#2\endLine{%
+ \maybeMsg{<#1 . >}%
+ \Evaluate{#1}%
+ \def\do##1##2##3{%
+ \if1\Expr{##2}%
+ \def\inLine{#2}%
+ \replaceModuleInLine
+ \StreamPut##1{\inLine}%
+ \fi
+ }%
+ \activefiles
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</program>
% \end{macrocode}