[latex3-commits] [git/LaTeX3-latex3-latex3] text-map: Collect Prepend codepoints correctly (48bb6406e)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Aug 9 10:42:18 CEST 2022
Repository : https://github.com/latex3/latex3
On branch : text-map
Link : https://github.com/latex3/latex3/commit/48bb6406e3a83e49cb495dd4cb3c8744ae81278b
>---------------------------------------------------------------
commit 48bb6406e3a83e49cb495dd4cb3c8744ae81278b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Aug 9 09:42:18 2022 +0100
Collect Prepend codepoints correctly
Needs to allow for Control codepoints: to do.
>---------------------------------------------------------------
48bb6406e3a83e49cb495dd4cb3c8744ae81278b
l3kernel/l3text-map.dtx | 31 +++++++++++++++++++++++++++++--
l3kernel/testfiles/m3text006.luatex.tlg | 22 +++++++++++-----------
l3kernel/testfiles/m3text006.ptex.tlg | 22 +++++++++++-----------
l3kernel/testfiles/m3text006.tlg | 22 +++++++++++-----------
l3kernel/testfiles/m3text006.xetex.tlg | 22 +++++++++++-----------
5 files changed, 73 insertions(+), 46 deletions(-)
diff --git a/l3kernel/l3text-map.dtx b/l3kernel/l3text-map.dtx
index c9d7961a4..98e47feef 100644
--- a/l3kernel/l3text-map.dtx
+++ b/l3kernel/l3text-map.dtx
@@ -85,6 +85,9 @@
% \@@_map_SpacingMark:Nnn ,
% \@@_map_Prepend:Nnn
% }
+% \begin{macro}[EXP]{\@@_map_Prepend:Nnw}
+% \begin{macro}[EXP]{\@@_map_Prepend:NnN}
+% \begin{macro}[EXP]{\@@_map_Prepend:Nnn}
% \begin{macro}[EXP]
% {
% \@@_map_not_Control:Nnn ,
@@ -290,13 +293,34 @@
{ \@@_map_loop:Nnw #1 {#2#3} }
\cs_new_eq:NN \@@_map_SpacingMark:Nnn \@@_map_Extend:Nnn
% \end{macrocode}
-% Retain and loop, outputting anything earlier.
+% Outputting anything earlier, the combine with what follows.
% \begin{macrocode}
\cs_new:Npn \@@_map_Prepend:Nnn #1#2#3
{
\@@_map_output:Nn #1 {#2}
- \@@_map_loop:Nnw #1 {#3}
+ \@@_map_Prepend:Nnw #1 {#3}
+ }
+\cs_new:Npn \@@_map_Prepend:Nnw
+ #1#2#3 \q_@@_recursion_stop
+ {
+ \tl_if_head_is_N_type:nTF {#3}
+ { \@@_map_Prepend:NnN #1 {#2} }
+ { \@@_map_loop:Nnw #1 {#2} }
+ #3 \q_@@_recursion_stop
+ }
+\cs_new:Npn \@@_map_Prepend:NnN #1#2#3
+ {
+ \@@_if_q_recursion_tail_stop_do:Nn #3 { #1 {#2} }
+ \token_if_cs:NTF #3
+ {
+ #1 {#2}
+ \@@_map_loop:Nnw #1 { }
+ }
+ { \@@_codepoint_process:nN { \@@_map_Prepend_aux:Nnn #1 {#2} } }
+ #3
}
+\cs_new:Npn \@@_map_Prepend_aux:Nnn #1#2#3
+ { \@@_map_loop:Nnw #1 {#2#3} }
% \end{macrocode}
% Dealing with end-of-class is done such that we can be flexible.
% \begin{macrocode}
@@ -515,6 +539,9 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\text_map_inline:nn}
% The standard non-expandable inline version.
diff --git a/l3kernel/testfiles/m3text006.luatex.tlg b/l3kernel/testfiles/m3text006.luatex.tlg
index b269efe70..d42a0e604 100644
--- a/l3kernel/testfiles/m3text006.luatex.tlg
+++ b/l3kernel/testfiles/m3text006.luatex.tlg
@@ -140,7 +140,17 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] SPACE (Other) ^^f7 [0.3]
+TRUE
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <CARRIAGE RETURN (CR)> (CR) ^^f7 [0.3]
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <LINE FEED (LF)> (LF) ^^f7 [0.3]
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <START OF HEADING> (Control) ^^f7 [0.3]
+TRUE
+TRUE
+TRUE
+TRUE
TRUE
TRUE
TRUE
@@ -150,29 +160,20 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [0.3]
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL CHOSEONG KIYEOK (L) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL JUNGSEONG FILLER (V) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL JONGSEONG KIYEOK (T) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL SYLLABLE GA (LV) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL SYLLABLE GAG (LVT) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] WATCH (ExtPict) ^^f7 [0.3]
TRUE
TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] <reserved-0378> (Other) ^^f7 [0.3]
TRUE
TRUE
TRUE
@@ -528,7 +529,6 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] LATIN SMALL LETTER A (Other) ^^f7 [999.0] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] LATIN SMALL LETTER B (Other) ^^f7 [0.3]
TRUE
TRUE
^^f7 [0.2] LATIN SMALL LETTER A (Other) ^^d7 [9.0] EMOJI MODIFIER FITZPATRICK TYPE-6 (Extend) ^^f7 [999.0] BABY (ExtPict) ^^d7 [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ^^d7 [11.0] OCTAGONAL SIGN (ExtPict) ^^f7 [0.3]
diff --git a/l3kernel/testfiles/m3text006.ptex.tlg b/l3kernel/testfiles/m3text006.ptex.tlg
index b269efe70..d42a0e604 100644
--- a/l3kernel/testfiles/m3text006.ptex.tlg
+++ b/l3kernel/testfiles/m3text006.ptex.tlg
@@ -140,7 +140,17 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] SPACE (Other) ^^f7 [0.3]
+TRUE
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <CARRIAGE RETURN (CR)> (CR) ^^f7 [0.3]
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <LINE FEED (LF)> (LF) ^^f7 [0.3]
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <START OF HEADING> (Control) ^^f7 [0.3]
+TRUE
+TRUE
+TRUE
+TRUE
TRUE
TRUE
TRUE
@@ -150,29 +160,20 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [0.3]
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL CHOSEONG KIYEOK (L) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL JUNGSEONG FILLER (V) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL JONGSEONG KIYEOK (T) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL SYLLABLE GA (LV) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL SYLLABLE GAG (LVT) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] WATCH (ExtPict) ^^f7 [0.3]
TRUE
TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] <reserved-0378> (Other) ^^f7 [0.3]
TRUE
TRUE
TRUE
@@ -528,7 +529,6 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] LATIN SMALL LETTER A (Other) ^^f7 [999.0] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] LATIN SMALL LETTER B (Other) ^^f7 [0.3]
TRUE
TRUE
^^f7 [0.2] LATIN SMALL LETTER A (Other) ^^d7 [9.0] EMOJI MODIFIER FITZPATRICK TYPE-6 (Extend) ^^f7 [999.0] BABY (ExtPict) ^^d7 [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ^^d7 [11.0] OCTAGONAL SIGN (ExtPict) ^^f7 [0.3]
diff --git a/l3kernel/testfiles/m3text006.tlg b/l3kernel/testfiles/m3text006.tlg
index ab3b55f36..e700ca364 100644
--- a/l3kernel/testfiles/m3text006.tlg
+++ b/l3kernel/testfiles/m3text006.tlg
@@ -140,7 +140,17 @@ TRUE
TRUE
TRUE
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] SPACE (Other) ^^c3^^b7 [0.3]
+TRUE
+TRUE
+ ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^b7 [5.0] <CARRIAGE RETURN (CR)> (CR) ^^c3^^b7 [0.3]
+TRUE
+ ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^b7 [5.0] <LINE FEED (LF)> (LF) ^^c3^^b7 [0.3]
+TRUE
+ ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^b7 [5.0] <START OF HEADING> (Control) ^^c3^^b7 [0.3]
+TRUE
+TRUE
+TRUE
+TRUE
TRUE
TRUE
TRUE
@@ -150,29 +160,20 @@ TRUE
TRUE
TRUE
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ^^c3^^b7 [0.3]
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^b7 [0.3]
TRUE
TRUE
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] HANGUL CHOSEONG KIYEOK (L) ^^c3^^b7 [0.3]
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] HANGUL JUNGSEONG FILLER (V) ^^c3^^b7 [0.3]
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] HANGUL JONGSEONG KIYEOK (T) ^^c3^^b7 [0.3]
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] HANGUL SYLLABLE GA (LV) ^^c3^^b7 [0.3]
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] HANGUL SYLLABLE GAG (LVT) ^^c3^^b7 [0.3]
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] WATCH (ExtPict) ^^c3^^b7 [0.3]
TRUE
TRUE
TRUE
TRUE
TRUE
- ^^c3^^b7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] <reserved-0378> (Other) ^^c3^^b7 [0.3]
TRUE
TRUE
TRUE
@@ -528,7 +529,6 @@ TRUE
TRUE
TRUE
TRUE
- ^^c3^^b7 [0.2] LATIN SMALL LETTER A (Other) ^^c3^^b7 [999.0] ARABIC NUMBER SIGN (Prepend) ^^c3^^97 [9.2] LATIN SMALL LETTER B (Other) ^^c3^^b7 [0.3]
TRUE
TRUE
^^c3^^b7 [0.2] LATIN SMALL LETTER A (Other) ^^c3^^97 [9.0] EMOJI MODIFIER FITZPATRICK TYPE-6 (Extend) ^^c3^^b7 [999.0] BABY (ExtPict) ^^c3^^97 [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ^^c3^^97 [11.0] OCTAGONAL SIGN (ExtPict) ^^c3^^b7 [0.3]
diff --git a/l3kernel/testfiles/m3text006.xetex.tlg b/l3kernel/testfiles/m3text006.xetex.tlg
index b269efe70..d42a0e604 100644
--- a/l3kernel/testfiles/m3text006.xetex.tlg
+++ b/l3kernel/testfiles/m3text006.xetex.tlg
@@ -140,7 +140,17 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] SPACE (Other) ^^f7 [0.3]
+TRUE
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <CARRIAGE RETURN (CR)> (CR) ^^f7 [0.3]
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <LINE FEED (LF)> (LF) ^^f7 [0.3]
+TRUE
+ ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [5.0] <START OF HEADING> (Control) ^^f7 [0.3]
+TRUE
+TRUE
+TRUE
+TRUE
TRUE
TRUE
TRUE
@@ -150,29 +160,20 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] ARABIC NUMBER SIGN (Prepend) ^^f7 [0.3]
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL CHOSEONG KIYEOK (L) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL JUNGSEONG FILLER (V) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL JONGSEONG KIYEOK (T) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL SYLLABLE GA (LV) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] HANGUL SYLLABLE GAG (LVT) ^^f7 [0.3]
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] WATCH (ExtPict) ^^f7 [0.3]
TRUE
TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] <reserved-0378> (Other) ^^f7 [0.3]
TRUE
TRUE
TRUE
@@ -528,7 +529,6 @@ TRUE
TRUE
TRUE
TRUE
- ^^f7 [0.2] LATIN SMALL LETTER A (Other) ^^f7 [999.0] ARABIC NUMBER SIGN (Prepend) ^^d7 [9.2] LATIN SMALL LETTER B (Other) ^^f7 [0.3]
TRUE
TRUE
^^f7 [0.2] LATIN SMALL LETTER A (Other) ^^d7 [9.0] EMOJI MODIFIER FITZPATRICK TYPE-6 (Extend) ^^f7 [999.0] BABY (ExtPict) ^^d7 [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ^^d7 [11.0] OCTAGONAL SIGN (ExtPict) ^^f7 [0.3]
More information about the latex3-commits
mailing list.