[latex3-commits] [git/LaTeX3-latex3-latex3] l3text: Replace only control sequences and actives in pure text (97bc0a18e)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Dec 6 17:36:27 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : l3text
Link       : https://github.com/latex3/latex3/commit/97bc0a18e896b54780a2e1cff45e06ba966a9f01

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

commit 97bc0a18e896b54780a2e1cff45e06ba966a9f01
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Dec 6 16:36:27 2019 +0000

    Replace only control sequences and actives in pure text


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

97bc0a18e896b54780a2e1cff45e06ba966a9f01
 l3kernel/l3text.dtx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 08db41b85..2530198ad 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -2248,7 +2248,13 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_purify_replace:N #1
   {
-    \cs_if_exist:cTF { l_@@_purify_ \token_to_str:N #1 _tl }
+    \bool_lazy_and:nnTF
+      { \cs_if_exist_p:c { l_@@_purify_ \token_to_str:N #1 _tl } }
+      {
+        \bool_lazy_or_p:nn
+          { \token_if_cs_p:N #1 }
+          { \token_if_active_p:N #1 }
+      }
       {
         \exp_args:Nv \@@_purify_replace:n
           { l_@@_purify_ \token_to_str:N #1 _tl }





More information about the latex3-commits mailing list