Skip to content

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