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

caddyfile: Fix comparing if two tokens are on the same line #5626

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

WeidiDeng
Copy link
Member

Fix 5625.

@WeidiDeng WeidiDeng added the bug 🐞 Something isn't working label Jul 12, 2023
@WeidiDeng WeidiDeng added this to the v2.7.0 milestone Jul 12, 2023
@WeidiDeng WeidiDeng requested a review from mholt July 12, 2023 03:02
@francislavoie
Copy link
Member

Nice! Great to see all those duplicated conditions simplified.

I wonder if this should be a method on Token instead, like t1.isNextOnNewLine(t2) 🤔 effectively the same thing, just not sure which API is nicer.

@francislavoie francislavoie changed the title fix comparing if two tokens are on the same line caddyfile: Fix comparing if two tokens are on the same line Jul 12, 2023
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this looks much improved 😃 Thank you!

@francislavoie Yeah, either way is fine with me IMO. Can be changed later too :)

@mholt mholt merged commit bbe1952 into master Jul 12, 2023
22 checks passed
@mholt mholt deleted the fix-token-line-compare branch July 12, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Caddy 2.7.0-beta.2: nested imports in handler broken (again)
3 participants