[latex3-commits] [git/LaTeX3-latex3-latex3] main: Correct space stripping for choices in xtemplate (f5f24df0d)

Bruno Le Floch blflatex at gmail.com
Tue Nov 2 11:02:51 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/f5f24df0d08c0c16b75eb485188918316e694ae0

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

commit f5f24df0d08c0c16b75eb485188918316e694ae0
Author: Bruno Le Floch <blflatex at gmail.com>
Date:   Tue Nov 2 11:02:01 2021 +0100

    Correct space stripping for choices in xtemplate
    
    For performance, comma list variables are always assumed to be stripped of
    spaces.  Setting a comma list equal to a token list directly is thus unsafe,
    as documented in l3clist.


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

f5f24df0d08c0c16b75eb485188918316e694ae0
 l3packages/xtemplate/xtemplate.dtx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/l3packages/xtemplate/xtemplate.dtx b/l3packages/xtemplate/xtemplate.dtx
index 9c038494f..75338d797 100644
--- a/l3packages/xtemplate/xtemplate.dtx
+++ b/l3packages/xtemplate/xtemplate.dtx
@@ -1280,7 +1280,7 @@
     \seq_put_right:No \l_@@_key_order_seq \l_@@_key_name_tl
     \str_if_eq:onT \l_@@_keytype_tl { choice }
       {
-        \clist_if_in:NnT \l_@@_keytype_arg_tl { unknown }
+        \exp_args:No \clist_if_in:nnT \l_@@_keytype_arg_tl { unknown }
           { \msg_error:nn { xtemplate } { choice-unknown-reserved } }
       }
   }
@@ -1713,7 +1713,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_implement_choices:n #1
   {
-    \clist_set_eq:NN \l_@@_tmp_clist \l_@@_keytype_arg_tl
+    \clist_set:No \l_@@_tmp_clist { \l_@@_keytype_arg_tl }
     \prop_put:Non \l_@@_vars_prop \l_@@_key_name_tl { }
     \keyval_parse:NNn
       \@@_implement_choice_elt:n \@@_implement_choice_elt:nn





More information about the latex3-commits mailing list.