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: block comment spacing #706

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohd-akram
Copy link

Fixes #705

@davidbonnet
Copy link
Owner

Thanks for submitting this @mohd-akram. IMHO, astring should not alter comment blocks at all (it was an initial design decision that became silly), so that it does what you would expect. Thus, only the leading spaces of comments would be updated to accommodate the current identation, but not the trailing ones.

WDYT?

@mohd-akram
Copy link
Author

I agree, but I think trailing spaces followed by a newline can also be removed as they serve no purpose. In this PR, leading spaces are removed if they are preceded by an indent, and trailing spaces are removed if they are followed by a newline. The issue was that previously it trimmed trailing spaces between the comment text and */.

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.

Inline block comment space trimmed
2 participants