-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gh1399 Trim spaces from envname #1401
Gh1399 Trim spaces from envname #1401
Conversation
\cs_new_protected:Npn \@@_declare_env:nnnn #1#2 | ||
{ | ||
\str_set:Nx \l_@@_environment_str {#1} | ||
\str_set:Nx \l_@@_environment_str | ||
{ \tl_trim_spaces:o { \l_@@_environment_str } } | ||
\cs_if_exist:cTF { \l_@@_environment_str } | ||
{ | ||
\msg_info:nnxx { cmd } { redefine-env } | ||
{ \l_@@_environment_str } { \tl_to_str:n {#2} } | ||
} | ||
{ | ||
\msg_info:nnxx { cmd } { define-env } | ||
{ \l_@@_environment_str } { \tl_to_str:n {#2} } | ||
} | ||
\str_set:Nn \l_@@_environment_str {#1} | ||
\cs_if_exist:cTF { #1 } | ||
{ \msg_info:nnnn { cmd } { redefine-env } { #1 } { #2 } } | ||
{ \msg_info:nnnn { cmd } { define-env } { #1 } { #2 } } | ||
\bool_set_false:N \l_@@_expandable_bool | ||
\bool_set_true:N \l_@@_environment_bool | ||
\exp_args:NV \@@_declare_env_internal:nnnn | ||
\l_@@_environment_str {#2} | ||
\@@_declare_env_internal:nnnn {#1} {#2} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A tiny difference: before str (the content of \l_@@_environment_str
) is used, now tl (the expansion result of \tl_trim_spaces:e { <envname> }
) is used.
As the fully-expanded, space-trimmed <envname>
is either used in csname or message, this change shouldn't affect behavior of code.
Fix for #1399.
Internal housekeeping
Status of pull request
Checklist of required changes before merge will be approved
\changes
entries in source includedchanges.txt
updatedltnewsX.tex
(and/orlatexchanges.tex
) updated