Skip to content
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

Rework expansion logic #29

Merged
merged 1 commit into from
Feb 14, 2018

Conversation

yobert
Copy link

@yobert yobert commented Feb 14, 2018

The previous logic would have some bugs if you had a tree like this:

key = value
a   = ${b} ${key} ${c}
b   = ${key}
c   = ${key}

This reworks the expand() logic to use a stack which is copied at each
level of recursion. This also fixes bugs when you have more than two
expansions, like this:

a = b
c = ${a}${a}${a}

The previous logic would have some bugs if you had a tree like this:

    key = value
    a   = ${b} ${key} ${c}
    b   = ${key}
    c   = ${key}

This reworks the expand() logic to use a stack which is copied at each
level of recursion. This also fixes bugs when you have more than two
expansions, like this:

    a = b
    c = ${a}${a}${a}
@magiconair magiconair merged commit 846e189 into magiconair:master Feb 14, 2018
@magiconair
Copy link
Owner

Released v1.7.6.

@magiconair magiconair added this to the 1.7.6 milestone Feb 23, 2022
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.

None yet

2 participants