[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Don't allow ={...} in expandable commands (821da69b)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Sep 1 22:17:07 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/821da69bd34cd1faed0eaaabafc308b9cfc048c9

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

commit 821da69bd34cd1faed0eaaabafc308b9cfc048c9
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Mon Aug 29 23:18:42 2022 -0300

    Don't allow ={...} in expandable commands


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

821da69bd34cd1faed0eaaabafc308b9cfc048c9
 base/ltcmd.dtx | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index b9a28aa4..34c88ba4 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -1076,6 +1076,12 @@
     \@@_normalize_type_aux:NnNn = {#2}
       \l_@@_suppress_strip_bool
       {
+        \bool_if:NT \l_@@_expandable_bool
+          {
+            \msg_error:nnxx { cmd } { keyval-in-expandable }
+              { \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} }
+            \@@_bad_def:wn
+          }
         \bool_set_true:N \l_@@_suppress_strip_bool
         \bool_set_false:N \l_@@_grab_expandably_bool
         \tl_put_right:Nx \l_@@_arg_spec_tl
@@ -4621,6 +4627,13 @@
     This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones.
     \c_@@_ignore_def_tl
   }
+\msg_new:nnnn { cmd } { keyval-in-expandable }
+  { Invalid~argument~prefix~'='~in~command~'#1'. }
+  {
+    The~argument~specification~for~'#1'~contains~a~key--value~marker~'={#2}'.~
+    This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones.
+    \c_@@_ignore_def_tl
+  }
 \msg_new:nnnn { cmd } { too-many-args }
   { Too~many~arguments~for~#1. }
   {





More information about the latex3-commits mailing list.