[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: Check extra \EndModuleRelease and nesting (cd194b44)

PhelypeOleinik phelype.oleinik at latex-project.org
Wed Mar 10 20:17:50 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh479
Link       : https://github.com/latex3/latex2e/commit/cd194b44ebf0500f57f0b48397fe689e0cea22eb

>---------------------------------------------------------------

commit cd194b44ebf0500f57f0b48397fe689e0cea22eb
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Wed Mar 10 16:17:50 2021 -0300

    Check extra \EndModuleRelease and nesting


>---------------------------------------------------------------

cd194b44ebf0500f57f0b48397fe689e0cea22eb
 base/ltvers.dtx | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/base/ltvers.dtx b/base/ltvers.dtx
index 210aceb0..5cba8d68 100644
--- a/base/ltvers.dtx
+++ b/base/ltvers.dtx
@@ -318,9 +318,9 @@
   \ifx\@check at IncludeInRelease#2\else
     \PackageError{latexrelease}{skipped IncludeInRelease for tag \string#2}{}%
   \fi
-\if at skipping@module
-  \expandafter\new at module@skip
-\fi}
+  \if at skipping@module
+    \expandafter\new at module@skip
+  \fi}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -349,11 +349,15 @@
 \let\if at skipping@module\iffalse
 \def\@skipping at moduletrue{\let\if at skipping@module\iftrue}
 \def\@skipping at modulefalse{\let\if at skipping@module\iffalse}
+\let\new at modulename\@empty
+\let\new at moduledate\@empty
 \def\NewModuleRelease#1#2{%
+  \ifx\new at modulename\@empty \else
+    \@latex at error{Nested \noexpand\NewModuleRelease forbidden.}\@ehd \fi
   \edef\new at modulename{#1}%
   \edef\new at moduledate{#2}%
   \GenericInfo{}{BEGIN module: \new at modulename\space (\new at moduledate)}%
-  \ifnum\sourceLaTeXdate<
+  \ifnum\sourceLaTeXdate<%
       \expandafter\@parse at version\new at moduledate//00\@nil\relax
     \@skipping at modulefalse
   \else
@@ -362,10 +366,14 @@
   \fi}
 \long\def\new at module@skip#1\IncludeInRelease{\IncludeInRelease}
 \def\EndModuleRelease{%
-  \GenericInfo{}{END module: \new at modulename\space (\new at moduledate)}%
-  \let\new at modulename\@empty
-  \let\new at moduledate\@empty
-  \@skipping at modulefalse}
+  \ifx\new at modulename\@empty
+    \@latex at error{Extra \string\EndModuleRelease.}\@eha
+  \else
+    \GenericInfo{}{END module: \new at modulename\space (\new at moduledate)}%
+    \let\new at modulename\@empty
+    \let\new at moduledate\@empty
+    \@skipping at modulefalse
+  \fi}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}





More information about the latex3-commits mailing list.