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

Fix resulting end position when endIndex is 0 for rangeBy #1932

Merged

Conversation

romainmenke
Copy link
Contributor

@romainmenke romainmenke commented Mar 20, 2024

When endIndex is exactly 0 it is ignored and the end position will fallback to the end of the node.

Checking that it is a number instead of a simpler boolean check does seem to work as I would expect.

@romainmenke romainmenke changed the title failing test: for endIndex 0 in rangeBy Fix resulting end position when endIndex is 0 for rangeBy Mar 20, 2024
@ai ai merged commit c1ad8fb into postcss:main Mar 20, 2024
8 checks passed
@ai
Copy link
Member

ai commented Mar 20, 2024

Do we have a real use case? If yes, I can release it today (if not, I will wait another changes).

@romainmenke
Copy link
Contributor Author

Working on this for Stylelint: stylelint/stylelint#7518
It isn't causing issues for end users. It would be nice to have for me, so that I can finish work there.

But please take your time, I always have plenty to do 😅

@romainmenke romainmenke deleted the fix-warning-end-index--inventive-numbat-fbada42105 branch March 20, 2024 17:57
@ai
Copy link
Member

ai commented Mar 20, 2024

Thanks. Released in 8.4.38.

@romainmenke
Copy link
Contributor Author

Thank you 🙇

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