[latex3-commits] [git/LaTeX3-latex3-latex2e] gh903: fix for #903 (ea60ed35)
Frank Mittelbach
frank.mittelbach at latex-project.org
Sat Sep 3 16:50:13 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : gh903
Link : https://github.com/latex3/latex2e/commit/ea60ed35477976be9868c9fdcac595f3a225f5cc
>---------------------------------------------------------------
commit ea60ed35477976be9868c9fdcac595f3a225f5cc
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Sat Sep 3 16:50:13 2022 +0200
fix for #903
>---------------------------------------------------------------
ea60ed35477976be9868c9fdcac595f3a225f5cc
base/changes.txt | 6 ++++++
base/docstrip.dtx | 20 ++++++++++++++------
base/testfiles/github-0903.lvt | 25 +++++++++++++++++++++++++
base/testfiles/github-0903.tlg | 39 +++++++++++++++++++++++++++++++++++++++
4 files changed, 84 insertions(+), 6 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 6a3521bf..a52076d2 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,12 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2022-09-03 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * docstrip.dtx (subsection{The handling of options}):
+ Complete the handling of @@-modules from l3docstrip.dtx (gh/337)
+ for +/- lines it was not done (gh/903)
+
2022-08-21 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* ltkeys.dtx (subsection{Option usage scope}):
diff --git a/base/docstrip.dtx b/base/docstrip.dtx
index 22c1f69a..de20073c 100644
--- a/base/docstrip.dtx
+++ b/base/docstrip.dtx
@@ -29,9 +29,9 @@
\catcode`\{=1
\catcode`\}=2
\def\filename{docstrip.dtx}
-\def\fileversion{v2.6a}
-\def\filedate{2020-11-23}
-\def\docdate {2020-11-23}
+\def\fileversion{v2.6b}
+\def\filedate{2022-09-03}
+\def\docdate {2022-09-03}
%%
%
%\iffalse
@@ -42,7 +42,7 @@
%% Frank Mittelbach
%% Copyright (C) 1995 Marcin Woli\'nski
%% Copyright (C) 1996-1997 Mark Wooding, Marcin Woli\'nski
-%% Copyright (C) 1998-2021 LaTeX Project and the above authors.
+%% Copyright (C) 1998-2022 LaTeX Project and the above authors.
%% All rights are reserved.
%%
%
@@ -2537,12 +2537,16 @@ Z
% |\plusOption| is called. This macro is very similar to
% |\doOption|, the only difference being that displayed
% message now contains `\texttt{+}'.
+% \changes{v2.6b}{2022-09-03}{Complete the handling of @@-modules from
+% \texttt{l3docstrip.dtx} (gh/337) also for +/- lines (gh/903)}
% \begin{macrocode}
\def\plusOption+#1>#2\endLine{%
\maybeMsg{<+#1 . >}%
\Evaluate{#1}%
\def\do##1##2##3{%
- \if1\Expr{##2}\StreamPut##1{#2}\fi
+ \if1\Expr{##2}%
+ \def\inLine{#2}\replaceModuleInLine
+ \StreamPut##1{\inLine}\fi
}%
\activefiles
}
@@ -2553,12 +2557,16 @@ Z
% When a `\texttt{-}' is found as a guard modifier,
% |\minusOption| is called. This macro is very similar to
% |\plusOption|, the difference is that condition is negated.
+% \changes{v2.6b}{2022-09-03}{Complete the handling of @@-modules from
+% \texttt{l3docstrip.dtx} (gh/337) also for +/- lines (gh/903)}
% \begin{macrocode}
\def\minusOption-#1>#2\endLine{%
\maybeMsg{<-#1 . >}%
\Evaluate{#1}%
\def\do##1##2##3{%
- \if1\Expr{##2}\else \StreamPut##1{#2}\fi
+ \if1\Expr{##2}\else
+ \def\inLine{#2}\replaceModuleInLine
+ \StreamPut##1{\inLine}\fi
}%
\activefiles
}
diff --git a/base/testfiles/github-0903.lvt b/base/testfiles/github-0903.lvt
new file mode 100644
index 00000000..87c6d91e
--- /dev/null
+++ b/base/testfiles/github-0903.lvt
@@ -0,0 +1,25 @@
+\begin{filecontents*}[force]{\jobname-test.dtx}
+%<@@=test>
+% \begin{macrocode}
+%<base>\tl_new:N\g_@@_blubA_tl
+%<+base>\tl_new:N\g_@@_blubB_tl
+%<-foobar>\tl_new:N\g_@@_blubC_tl
+% \end{macrocode}
+\end{filecontents*}
+
+
+\input{test2e}
+
+\input docstrip.tex
+
+\START
+
+\askforoverwritefalse
+
+\generate{\file{\jobname-test.sty}{\from{\jobname-test.dtx}{base}}}
+
+\SHOWFILE{\jobname-test.sty}
+
+\END
+
+\endbatchfile
diff --git a/base/testfiles/github-0903.tlg b/base/testfiles/github-0903.tlg
new file mode 100644
index 00000000..d6f8dabe
--- /dev/null
+++ b/base/testfiles/github-0903.tlg
@@ -0,0 +1,39 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+Generating file(s) ./github-0903-test.sty
+Processing file github-0903-test.dtx (base) -> github-0903-test.sty
+<@@=test> % <base . > <+base . > <-foobar . > %
+Lines processed: 6
+Comments removed: 2
+Comments passed: 0
+Codelines passed: 0
+-------- github-0903-test.sty (start) ---------
+(github-0903-test.sty) %%^^M
+%% This is file `github-0903-test.sty',^^M
+%% generated with the docstrip utility.^^M
+%%^^M
+%% The original source files were:^^M
+%%^^M
+%% github-0903-test.dtx (with options: `base')^^M
+%%^^M
+%% IMPORTANT NOTICE:^^M
+%%^^M
+%% For the copyright see the source file.^^M
+%%^^M
+%% Any modified versions of this file must be renamed^^M
+%% with new filenames distinct from github-0903-test.sty.^^M
+%%^^M
+%% For distribution of the original source see the terms^^M
+%% for copying and modification in the file github-0903-test.dtx.^^M
+%%^^M
+%% This generated file may be distributed as long as the^^M
+%% original source files, as listed above, are part of the^^M
+%% same distribution. (The sources need not necessarily be^^M
+%% in the same archive or directory.)^^M
+\tl_new:N\g__test_blubA_tl^^M
+\tl_new:N\g__test_blubB_tl^^M
+\tl_new:N\g__test_blubC_tl^^M
+\endinput^^M
+%%^^M
+%% End of file `github-0903-test.sty'.^^M
+-------- github-0903-test.sty (end) -----------
More information about the latex3-commits
mailing list.