Open mohd-akram opened 5 months ago
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?
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 */
.
Fixes #705