[latex3-commits] [git/LaTeX3-latex3-latex3] gh900: Fix unbracing behaviour of \clist_map_tokens:nn (ee02eb9b2)
Bruno Le Floch
blflatex at gmail.com
Wed May 5 15:16:10 CEST 2021
Repository : https://github.com/latex3/latex3
On branch : gh900
Link : https://github.com/latex3/latex3/commit/ee02eb9b2a7ed1e2a01d7b689554fc55903e8fc9
>---------------------------------------------------------------
commit ee02eb9b2a7ed1e2a01d7b689554fc55903e8fc9
Author: Bruno Le Floch <blflatex at gmail.com>
Date: Wed May 5 15:16:10 2021 +0200
Fix unbracing behaviour of \clist_map_tokens:nn
>---------------------------------------------------------------
ee02eb9b2a7ed1e2a01d7b689554fc55903e8fc9
l3kernel/l3clist.dtx | 3 ++-
l3kernel/testfiles/m3clist002.lvt | 4 ++--
l3kernel/testfiles/m3clist002.tlg | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index 1f0dc5e73..f79c60e95 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -1814,7 +1814,8 @@
\tl_if_empty:oF { \use_none:nn #2 ? }
{
\exp_args:No \@@_if_recursion_tail_break:nN {#2} \clist_map_break:
- \tl_trim_spaces_apply:oN {#2} \@@_map_unbrace:wn , {#1}
+ \exp_after:wN \@@_map_unbrace:wn
+ \exp:w \tl_trim_spaces_apply:oN {#2} \exp_end: , {#1}
}
\@@_map_tokens_n:nw {#1} \prg_do_nothing:
}
diff --git a/l3kernel/testfiles/m3clist002.lvt b/l3kernel/testfiles/m3clist002.lvt
index 8392a7287..0fc6f97ac 100644
--- a/l3kernel/testfiles/m3clist002.lvt
+++ b/l3kernel/testfiles/m3clist002.lvt
@@ -378,11 +378,11 @@
\cs_set:Npn \MAP:n #1 { \exp_args:No \TYPE {\tl_to_str:n{#1}} }
\clist_map_function:NN \l_tmpa_clist \MAP:n
\clist_map_function:cN {l_tmpa_clist} \MAP:n
- \clist_map_function:nN {aa,bb\par,cc} \MAP:n
+ \clist_map_function:nN {aa,bb\par,~{cc}} \MAP:n
\cs_set:Npn \MAP:nn #1#2 { \exp_args:No \TYPE {\tl_to_str:n{#1:#2}} }
\clist_map_tokens:Nn \l_tmpa_clist { \MAP:nn \A }
\clist_map_tokens:cn {l_tmpa_clist} { \MAP:nn \B }
- \clist_map_tokens:nn {aa,bb\par,cc} { \MAP:n }
+ \clist_map_tokens:nn {aa,bb\par,~{cc}} { \MAP:n }
}
\TEST{map_variable}{
diff --git a/l3kernel/testfiles/m3clist002.tlg b/l3kernel/testfiles/m3clist002.tlg
index 2c8bf5dac..ac08cd461 100644
--- a/l3kernel/testfiles/m3clist002.tlg
+++ b/l3kernel/testfiles/m3clist002.tlg
@@ -306,7 +306,7 @@ cc
\B :a
aa
bb\par
-cc
+{cc}
============================================================
============================================================
TEST 25: map_variable
More information about the latex3-commits
mailing list.