From 6bb6a35bbdba3fad2cc2b6de241a333af2c8aca7 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Tue, 7 Feb 2023 07:57:25 +0000 Subject: [PATCH] Another place to use \codepoint_generate:nn --- l3kernel/l3text-purify.dtx | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/l3kernel/l3text-purify.dtx b/l3kernel/l3text-purify.dtx index 07c1d3f783..bdf7f876ec 100644 --- a/l3kernel/l3text-purify.dtx +++ b/l3kernel/l3text-purify.dtx @@ -464,40 +464,15 @@ % gets converted to two letters. (At some stage an alternative version % can presumably be added to \pkg{babel} or similar.) % \begin{macrocode} -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_set_protected:Npn \@@_loop:Nn #1#2 { - \cs_set_protected:Npn \@@_loop:Nn #1#2 + \quark_if_recursion_tail_stop:N #1 + \text_declare_purify_equivalent:Nx #1 { - \quark_if_recursion_tail_stop:N #1 - \text_declare_purify_equivalent:Nx #1 - { - \char_generate:nn { "#2 } - { \char_value_catcode:n { "#2 } } - } - \@@_loop:Nn - } - } - { - \cs_set_protected:Npn \@@_loop:Nn #1#2 - { - \quark_if_recursion_tail_stop:N #1 - \text_declare_purify_equivalent:Nx #1 - { - \exp_args:Ne \@@_tmp:n - { \__kernel_codepoint_to_bytes:n { "#2 } } - } - \@@_loop:Nn - } - \cs_set:Npn \@@_tmp:n #1 { \@@_tmp:nnnn #1 } - \cs_set:Npn \@@_tmp:nnnn #1#2#3#4 - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#1} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#2} { 13 } + \codepoint_generate:nn {"#2} + { \char_value_catcode:n {"#2} } } + \@@_loop:Nn } \@@_loop:Nn \AA { 00C5 }