Skip to content

Commit

Permalink
Another place to use \codepoint_generate:nn
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Feb 7, 2023
1 parent aec0bcf commit 6bb6a35
Showing 1 changed file with 6 additions and 31 deletions.
37 changes: 6 additions & 31 deletions l3kernel/l3text-purify.dtx
Expand Up @@ -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 }
Expand Down

0 comments on commit 6bb6a35

Please sign in to comment.