[latex3-commits] [git/LaTeX3-latex3-latex3] main: Fix codeline indexing of \{ and \} (3233f33bd)
Bruno Le Floch
blflatex at gmail.com
Mon May 3 01:52:38 CEST 2021
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/3233f33bd77d77ec18d1324536117ab3b754ff9f
>---------------------------------------------------------------
commit 3233f33bd77d77ec18d1324536117ab3b754ff9f
Author: Bruno Le Floch <blflatex at gmail.com>
Date: Sat May 1 23:16:00 2021 +0200
Fix codeline indexing of \{ and \}
>---------------------------------------------------------------
3233f33bd77d77ec18d1324536117ab3b754ff9f
l3kernel/l3doc.dtx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index df9df3501..167c721bf 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -4267,24 +4267,25 @@ and all files in that bundle must be distributed together.
\token_to_str:N \verbatim at font \c_space_tl
\l_@@_index_escaped_macro_tl
}
- \encapchar
- codelinehdclindex{\the\c at HD@hypercount}{#6}
+ \encapchar hdclindex{\the\c at HD@hypercount}{#6}
}
}
% \end{macrocode}
%
-% \begin{macro}{\codelinehdclindex}
+% \begin{macro}{\hdclindex, \@@_old_hdclindex:nnn}
% Note that |#3| here could contain |ACODELINE-| more than once if
% several successive code lines have been merged into a range somehow.
% Note that the dash following |ACODELINE| is active in
% |interface3.tex| and in |source3.tex| at least, so we cannot simply
% search and remove |ACODELINE-|.
% \begin{macrocode}
-\cs_new_protected:Npn \codelinehdclindex #1#2#3
+\cs_new_eq:NN \@@_old_hdclindex:nnn \hdclindex
+\cs_generate_variant:Nn \@@_old_hdclindex:nnn { nnV }
+\cs_gset_protected:Npn \hdclindex #1#2#3
{
\tl_set:Nn \l_@@_tmpa_tl {#3}
\tl_replace_all:Nnn \l_@@_tmpa_tl { ACODELINE } { \use_none:n }
- \exp_args:Nnno \hdclindex {#1} {#2} \l_@@_tmpa_tl
+ \@@_old_hdclindex:nnV {#1} {#2} \l_@@_tmpa_tl
}
% \end{macrocode}
% \end{macro}
More information about the latex3-commits
mailing list.