Skip to content

Fix incorrect path-like splitting of texmfcnf variables#333

Open
jonathan-gruber-jg wants to merge 1 commit into
latex3:mainfrom
jonathan-gruber-jg:main
Open

Fix incorrect path-like splitting of texmfcnf variables#333
jonathan-gruber-jg wants to merge 1 commit into
latex3:mainfrom
jonathan-gruber-jg:main

Conversation

@jonathan-gruber-jg

Copy link
Copy Markdown

In a number of places in the source code, kpse.expand_var is used to evaluate a texmfcnf configuration variable when kpse.expand_braces would be the more correct choice. In the instances in question, kpse.expand_var is used to evaluate a texmfcnf configuration variable, and the resulting value is then split into colon- or semicolon-separated components that are then looped over (similar to how one splits the PATH environment variable into colon- or semicolon-separated components (depending upon the operating system) and loops over those components to find an executable).

If a texmfcnf variable, say A, is set to an expression containing braces, say {a,b}/c, then one clearly intends for the value of A to expand into a/c:b/c and then split into a/c and b/c. kpse.expand_var would expand A into {a,b}/c, in which case A would not be split correctly. kpse.expand_braces would expand A into a/c:b/c, which would correctly split A into a/c and b/c.

In a number of places in the source code, kpse.expand_var is used to
evaluate a texmfcnf configuration variable when kpse.expand_braces would
be the more correct choice. In the instances in question,
kpse.expand_var is used to evaluate a texmfcnf configuration variable,
and the resulting value is then split into colon- or semicolon-separated
components that are then looped over (similar to how one splits the PATH
environment variable into colon- or semicolon-separated components
(depending upon the operating system) and loops over those components to
find an executable).

If a texmfcnf variable, say A, is set to an expression containing
braces, say {a,b}/c, then one clearly intends for the value of A to
expand into a/c:b/c and then split into a/c and b/c. kpse.expand_var
would expand A into {a,b}/c, in which case A would not be split
correctly. kpse.expand_braces would expand A into a/c:b/c, which would
correctly split A into a/c and b/c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant