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

Refactor comment handling #128

Merged
merged 5 commits into from
May 9, 2024
Merged

Conversation

NickNeck
Copy link
Contributor

@NickNeck NickNeck commented Apr 2, 2024

closes #53 even if the title of the ticket mentioned trailing comments.

The PR refactors two things. The first refactoring changes the handling of trailing blocks. There are now some extra functions to handle the trailing blocks in separate functions. The AST inside the trailing block is always treated in the same way.

The other change concerns the line correction for leading and trailing comments. Then new version counts the newlines in the comments and not just the count of the comments.

The changes also make it necessary to adjust expected results in the tests. But I think that changes are making sense.

Copy link
Owner

@doorgan doorgan left a comment

Choose a reason for hiding this comment

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

Sorry it took me this long to review! These changes look great, and I really appreciate the extensive test updates 💜

@doorgan doorgan merged commit 96ddb13 into doorgan:main May 9, 2024
6 checks passed
@doorgan
Copy link
Owner

doorgan commented May 10, 2024

This is live in v1.1.0!

@NickNeck
Copy link
Contributor Author

This is live in v1.1.0!

Great. Thank you.

Sorry it took me this long to review!

No need to be sorry. It is your spare free time that you invest in this great project. Another thank you for all your work.

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.

Trailing comments misplaced
2 participants