Fix incorrect path-like splitting of texmfcnf variables#333
Open
jonathan-gruber-jg wants to merge 1 commit into
Open
Fix incorrect path-like splitting of texmfcnf variables#333jonathan-gruber-jg wants to merge 1 commit into
jonathan-gruber-jg wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.