diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3text.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3text.dtx | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx index 529020ebb91..15b6025b4cc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-06-16} +% \date{Released 2022-07-01} % % \maketitle % @@ -289,6 +289,10 @@ %<@@=text> % \end{macrocode} % +% \begin{macrocode} +\cs_generate_variant:Nn \tl_if_head_eq_meaning_p:nN { o } +% \end{macrocode} +% % \subsection{Internal auxiliaries} % % \begin{variable}{\s_@@_stop} @@ -901,15 +905,34 @@ } % \end{macrocode} % At this stage, either we have a control sequence or a simple character: -% split and handle. +% split and handle. The need to check for non-protected actives arises +% from handling of legacy input encodings: they need to end up in a +% representation we can deal with in further processing. The tests for +% explicit parts of the \LaTeXe{} UTF-8 mechanism cover the case of +% bookmarks, where definitions change and are no longer protected. % \begin{macrocode} \cs_new:Npn \@@_expand_explicit:N #1 { \token_if_cs:NTF #1 { \@@_expand_exclude:N #1 } { - \@@_expand_store:n {#1} - \@@_expand_loop:w + \bool_lazy_and:nnTF + { \token_if_active_p:N #1 } + { + ! \bool_lazy_any_p:n + { + { \token_if_protected_macro_p:N #1 } + { \token_if_protected_long_macro_p:N #1 } + { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii@two@octets } + { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii@three@octets } + { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii@four@octets } + } + } + { \exp_after:wN \@@_expand_loop:w #1 } + { + \@@_expand_store:n {#1} + \@@_expand_loop:w + } } } % \end{macrocode} |