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

FormatWriter: fix end marker handling #3734

Merged
merged 2 commits into from
Dec 27, 2023
Merged

Conversation

kitbellew
Copy link
Collaborator

The current issue is that the span is computed using leftLineId of the token just before and the token at the end. However, leftLineId refers to the beginning of the token, thus multiline comments are incorrectly accounted.

Instead, use the token at the beginning of the span and increase by 1. Fixes #3731.

The current issue is that the span is computed using `leftLineId` of the
token just before and the token at the end. However, `leftLineId` refers
to the beginning of the token, thus multiline comments are incorrectly
accounted.

Instead, use the token at the beginning of the span and increase by 1.
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

@kitbellew
Copy link
Collaborator Author

@tgodzik thank you, happy holidays!

@kitbellew kitbellew merged commit 4ed3b0f into scalameta:master Dec 27, 2023
9 checks passed
@kitbellew kitbellew deleted the 3731 branch December 27, 2023 14:27
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.

Config insertEndMarkerMinLines adds end marker for method counting scaladoc
2 participants