[latex3-commits] [git/LaTeX3-latex3-latex3] peek-analysis: Fix peeking active characters (94656ca98)
PhelypeOleinik
phelype.oleinik at latex-project.org
Tue Oct 27 14:09:47 CET 2020
Repository : https://github.com/latex3/latex3
On branch : peek-analysis
Link : https://github.com/latex3/latex3/commit/94656ca982190938c6404943575759c74ecafca6
>---------------------------------------------------------------
commit 94656ca982190938c6404943575759c74ecafca6
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Tue Oct 27 10:09:47 2020 -0300
Fix peeking active characters
>---------------------------------------------------------------
94656ca982190938c6404943575759c74ecafca6
l3kernel/l3tl-analysis.dtx | 3 +++
l3kernel/testfiles/m3peek002.lvt | 6 +++++-
l3kernel/testfiles/m3peek002.tlg | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/l3kernel/l3tl-analysis.dtx b/l3kernel/l3tl-analysis.dtx
index 2152ee31d..4e7748b8e 100644
--- a/l3kernel/l3tl-analysis.dtx
+++ b/l3kernel/l3tl-analysis.dtx
@@ -220,6 +220,8 @@
% and because even in other engines it is much easier to produce since
% \cs{char_generate:nn} refuses to produce spaces.
% \begin{macrocode}
+\group_begin:
+\char_set_active_eq:NN \ \scan_stop:
\tl_const:Nx \c_@@_peek_catcodes_tl
{
\char_generate:nn { 32 } { 3 } 3
@@ -232,6 +234,7 @@
\char_generate:nn { 32 } { 12 } \token_to_str:N C
\char_generate:nn { 32 } { 13 } \token_to_str:N D
}
+\group_end:
% \end{macrocode}
% \end{variable}
%
diff --git a/l3kernel/testfiles/m3peek002.lvt b/l3kernel/testfiles/m3peek002.lvt
index e86844e20..681e00644 100644
--- a/l3kernel/testfiles/m3peek002.lvt
+++ b/l3kernel/testfiles/m3peek002.lvt
@@ -275,6 +275,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begingroup
+\catcode`\X=13
+\def X{XXX}
\TEST { Peek~analysis~map~inline }
{
\peek_analysis_map_inline:n
@@ -282,9 +285,10 @@
\int_compare:nNnT {#2} = { `Z } { \peek_analysis_map_break:n { \TYPE } }
\TYPE { \tl_to_str:n { #1 , #2 , #3 } }
}
- a { ~ { } \c_group_begin_token \c_space_token }
+ a { ~ { } \c_group_begin_token \c_space_token } X
Z { TRUE }
}
+\endgroup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/l3kernel/testfiles/m3peek002.tlg b/l3kernel/testfiles/m3peek002.tlg
index 1a81a8971..54a671957 100644
--- a/l3kernel/testfiles/m3peek002.tlg
+++ b/l3kernel/testfiles/m3peek002.tlg
@@ -235,5 +235,6 @@ TEST 10: Peek analysis map inline
\exp_not:n {\c_group_begin_token },-1,0
\exp_not:n {\c_space_token },-1,0
\if_false: {\fi: },125,2
+\exp_not:N X,88,D
TRUE
============================================================
More information about the latex3-commits
mailing list.