[latex3-commits] [git/LaTeX3-latex3-latex2e] keyval-detect: Don't allow ={...} in expandable commands (367b9909)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Aug 31 08:27:16 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : keyval-detect
Link : https://github.com/latex3/latex2e/commit/367b990919e44abd78846f8c8bc6606ca5b2aa89
>---------------------------------------------------------------
commit 367b990919e44abd78846f8c8bc6606ca5b2aa89
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Mon Aug 29 23:18:42 2022 -0300
Don't allow ={...} in expandable commands
>---------------------------------------------------------------
367b990919e44abd78846f8c8bc6606ca5b2aa89
base/ltcmd.dtx | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index b9a28aa4..34c88ba4 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -1076,6 +1076,12 @@
\@@_normalize_type_aux:NnNn = {#2}
\l_@@_suppress_strip_bool
{
+ \bool_if:NT \l_@@_expandable_bool
+ {
+ \msg_error:nnxx { cmd } { keyval-in-expandable }
+ { \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} }
+ \@@_bad_def:wn
+ }
\bool_set_true:N \l_@@_suppress_strip_bool
\bool_set_false:N \l_@@_grab_expandably_bool
\tl_put_right:Nx \l_@@_arg_spec_tl
@@ -4621,6 +4627,13 @@
This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones.
\c_@@_ignore_def_tl
}
+\msg_new:nnnn { cmd } { keyval-in-expandable }
+ { Invalid~argument~prefix~'='~in~command~'#1'. }
+ {
+ The~argument~specification~for~'#1'~contains~a~key--value~marker~'={#2}'.~
+ This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones.
+ \c_@@_ignore_def_tl
+ }
\msg_new:nnnn { cmd } { too-many-args }
{ Too~many~arguments~for~#1. }
{
More information about the latex3-commits
mailing list.