[latex3-commits] [latex3/latex3] main: Avoid trimming spaces twice on (raw) key names (81a052427)
github at latex-project.org
github at latex-project.org
Tue Dec 12 21:03:19 CET 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/81a05242750c63148e03ee19fbb2cf74854cd76a
>---------------------------------------------------------------
commit 81a05242750c63148e03ee19fbb2cf74854cd76a
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Wed Dec 13 02:46:47 2023 +0800
Avoid trimming spaces twice on (raw) key names
`\__keys_trim_spaces:n` is now applied only once, after the last `.` in raw key
name is found.
>---------------------------------------------------------------
81a05242750c63148e03ee19fbb2cf74854cd76a
l3kernel/l3keys.dtx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/l3kernel/l3keys.dtx b/l3kernel/l3keys.dtx
index c300e3e5e..82c3036cf 100644
--- a/l3kernel/l3keys.dtx
+++ b/l3kernel/l3keys.dtx
@@ -1822,14 +1822,14 @@
% }
% Searching for a property means finding the last |.| in the input,
% and storing the text before and after it. Everything is turned into
-% strings, so there is no problem using an \texttt{e}-type expansion. Since
-% \cs{@@_trim_spaces:n} will turn its argument into a string anyway, this
-% function uses \cs{cs_set_nopar:Npe} instead of \cs{tl_set:Ne} to gain some
-% speed.
+% strings at first, so there is no problem using an \texttt{e}-type expansion
+% in aux functions. \cs{cs_set_nopar:Npe} instead of \cs{tl_set:Ne} or
+% \cs{str_set:Ne} is used to gain some speed.
+% Space trimming on key path is done only once, after the last |.| is found.
% \begin{macrocode}
\cs_new_protected:Npn \@@_property_find:n #1
{
- \cs_set_nopar:Npe \l_@@_property_str { \@@_trim_spaces:n { #1 } }
+ \str_set:Nn \l_@@_property_str { #1 }
\exp_after:wN \@@_property_find_auxi:w \l_@@_property_str
\s_@@_nil \@@_property_find_auxii:w
. \s_@@_nil \@@_property_find_err:w
More information about the latex3-commits
mailing list.