[latex3-commits] [latex3/latex3] develop: Fix \seq_map_pairwise_function:NNN not work with \seq_map_break:n (50bba5c22)
github at latex-project.org
github at latex-project.org
Mon Sep 2 17:46:03 CEST 2024
Repository : https://github.com/latex3/latex3
On branch : develop
Link : https://github.com/latex3/latex3/commit/50bba5c22a8fa534f853d96d66a60e0a8463e92d
>---------------------------------------------------------------
commit 50bba5c22a8fa534f853d96d66a60e0a8463e92d
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Mon Sep 2 23:03:44 2024 +0800
Fix \seq_map_pairwise_function:NNN not work with \seq_map_break:n
Fixes #1587
>---------------------------------------------------------------
50bba5c22a8fa534f853d96d66a60e0a8463e92d
l3kernel/CHANGELOG.md | 3 +++
l3kernel/l3seq.dtx | 1 +
l3kernel/testfiles/m3seq008.lvt | 6 +++++-
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 206ab948b..f99e9f70c 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Fixed
+- `\seq_map_pairwise_function:NNN` not work with `\seq_map_break:(n)` (issue \#1587)
+
### Changed
- Increase outdent of long function names in `l3doc` (issue \#1585)
diff --git a/l3kernel/l3seq.dtx b/l3kernel/l3seq.dtx
index 6ae2c58ad..f7ecc9b8e 100644
--- a/l3kernel/l3seq.dtx
+++ b/l3kernel/l3seq.dtx
@@ -2409,6 +2409,7 @@
\exp_after:wN \@@_map_pairwise_function:wNw #2 \s_@@_stop #3
#1 { ? \prg_break: } { }
\prg_break_point:
+ \prg_break_point:Nn \seq_map_break: { }
}
\cs_new:Npn \@@_map_pairwise_function:wNw \s_@@ #1 \s_@@_stop #2
{
diff --git a/l3kernel/testfiles/m3seq008.lvt b/l3kernel/testfiles/m3seq008.lvt
index 6c0725e5d..b6f8ecd9d 100644
--- a/l3kernel/testfiles/m3seq008.lvt
+++ b/l3kernel/testfiles/m3seq008.lvt
@@ -34,7 +34,11 @@
\seq_gpush:Nn \g_tmpa_seq { \d }
\seq_gpush:Nn \g_tmpa_seq { \e }
\seq_gpush:Nn \g_tmpa_seq { \f }
- \cs_set:Npn \test:nn #1#2 { \TYPE { " \tl_to_str:n {#1} ":"\tl_to_str:n {#2}" } \NEWLINE }
+ % Now each of \l_tmpa_seq and \l_tmpb_seq has 3 items,
+ % \g_tmpa_seq has 6 items, and \g_tmpb_seq has 0 items.
+ \cs_set:Npn \test:nn #1#2 { \TYPE { \tl_to_str:n {"#1":"#2"} } \NEWLINE }
+ \cs_set:Npn \test_break:nn #1#2
+ { \test:nn {#1} {#2} \seq_map_break: }
\TIMO
\TESTEXP { seq_map_pairwise_function:NNN }
More information about the latex3-commits
mailing list.