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: include comments at the end of blocks #225

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

stsewd
Copy link
Contributor

@stsewd stsewd commented Jul 11, 2023

Dedenting was happening too early for inline comments that were after an expression.

The indentation level for these comments was the number of space between the expression and the #, but when dealing with these, we don't need to dedent, so we can just return early.

Fixes #113

Alternative solution from #143

Dedenting was happening too early for inline comments that were after an expression.

The indentation level for these comments was the number of space between the expression and the `#`,
but when dealing with these, we don't need to dedent, so we can just return early.
@amaanq
Copy link
Member

amaanq commented Jul 11, 2023

great, thanks!

@amaanq amaanq merged commit db1d218 into tree-sitter:master Jul 11, 2023
3 checks passed
@stsewd stsewd deleted the dont-dedent-on-trailing-comments branch July 11, 2023 03:55
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 end-of-line comment not considered part of function body
2 participants