[latex3-commits] [git/LaTeX3-latex3-latex3] master: Fix peeking active characters (042c5cf5d)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Dec 3 15:03:21 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/042c5cf5d24e81df24167b2b5a46f52484456513

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

commit 042c5cf5d24e81df24167b2b5a46f52484456513
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Oct 27 10:09:47 2020 -0300

    Fix peeking active characters


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

042c5cf5d24e81df24167b2b5a46f52484456513
 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 d992eb60e..59b41d349 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 7d968c702..1689f18c9 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.