[latex3-commits] [git/LaTeX3-latex3-latex2e] keyval-detect: Don't allow ={...} in expandable commands (5c597660)
PhelypeOleinik
phelype.oleinik at latex-project.org
Tue Aug 30 04:18:42 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : keyval-detect
Link : https://github.com/latex3/latex2e/commit/5c597660b5ed84c513709da40168a01d4593bcbd
>---------------------------------------------------------------
commit 5c597660b5ed84c513709da40168a01d4593bcbd
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Mon Aug 29 23:18:42 2022 -0300
Don't allow ={...} in expandable commands
>---------------------------------------------------------------
5c597660b5ed84c513709da40168a01d4593bcbd
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.