summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex43
1 files changed, 32 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
index d68df11175c..5249b817c19 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
@@ -68,7 +68,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2020-05-14}%
+\def\ExplFileDate{2020-05-15}%
\begingroup
\def\next{\endgroup}%
\expandafter\ifx\csname PackageError\endcsname\relax
@@ -29702,13 +29702,30 @@
\__kernel_quark_new_test:N \__text_if_recursion_tail_stop:N
\cs_new:Npn \text_purify:n #1
{
+ \__kernel_exp_not:w \exp_after:wN
+ {
+ \exp:w
+ \exp_args:Ne \__text_purify:n
+ { \text_expand:n {#1} }
+ }
+ }
+\cs_new:Npn \__text_purify:n #1
+ {
\group_align_safe_begin:
- \exp_args:Ne \__text_purify:n
- { \text_expand:n {#1} }
+ \__text_purify_loop:w #1
+ \q__text_recursion_tail \q__text_recursion_stop
+ \__text_purify_result:n { }
+ }
+\cs_new:Npn \__text_purify_store:n #1
+ { \__text_purify_store:nw {#1} }
+\cs_new:Npn \__text_purify_store:nw #1#2 \__text_purify_result:n #3
+ { #2 \__text_purify_result:n { #3 #1 } }
+\cs_new:Npn \__text_purify_end:w #1 \__text_purify_result:n #2
+ {
\group_align_safe_end:
+ \exp_end:
+ #2
}
-\cs_new:Npn \__text_purify:n #1
- { \__text_purify_loop:w #1 \q__text_recursion_tail \q__text_recursion_stop }
\cs_new:Npn \__text_purify_loop:w #1 \q__text_recursion_stop
{
\tl_if_head_is_N_type:nTF {#1}
@@ -29723,12 +29740,12 @@
\cs_new:Npn \__text_purify_group:n #1 { \__text_purify_loop:w #1 }
\exp_last_unbraced:NNo \cs_new:Npn \__text_purify_space:w \c_space_tl
{
- \c_space_tl
+ \__text_purify_store:n { ~ }
\__text_purify_loop:w
}
\cs_new:Npn \__text_purify_N_type:N #1
{
- \__text_if_recursion_tail_stop:N #1
+ \__text_if_recursion_tail_stop_do:Nn #1 { \__text_purify_end:w }
\__text_purify_N_type_aux:N #1
}
\cs_new:Npn \__text_purify_N_type_aux:N #1
@@ -29760,11 +29777,14 @@
{ #2 \__text_purify_math_result:n { #3 #1 } }
\cs_new:Npn \__text_purify_math_end:w #1 \__text_purify_math_result:n #2
{
- \exp_not:n { $ #2 $ }
+ \__text_purify_store:n { $ #2 $ }
\__text_purify_loop:w #1
}
\cs_new:Npn \__text_purify_math_stop:Nw #1 \__text_purify_math_result:n #2
- { \exp_not:n {#1#2} }
+ {
+ \__text_purify_store:n {#1#2}
+ \__text_purify_end:w
+ }
\cs_new:Npn \__text_purify_math_loop:NNw #1#2#3 \q__text_recursion_stop
{
\tl_if_head_is_N_type:nTF {#3}
@@ -29834,7 +29854,8 @@
\token_if_cs:NTF #1
{ \__text_purify_expand:N #1 }
{
- \__text_token_to_explicit:N #1
+ \exp_args:Ne \__text_purify_store:n
+ { \__text_token_to_explicit:N #1 }
\__text_purify_loop:w
}
}
@@ -29852,7 +29873,7 @@
}
\cs_new:Npn \__text_purify_protect:N #1
{
- \__text_if_recursion_tail_stop:N #1
+ \__text_if_recursion_tail_stop_do:Nn #1 { \__text_purify_end:w }
\__text_purify_loop:w
}
\cs_new_protected:Npn \text_declare_purify_equivalent:Nn #1#2