You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is likely to be a problem in the "read" part of the cycle, not trimming off clearly-not-part-of-the-comment leading whitespace on the second line. Should be possible to clean that up.
This is a minor thing, but is it intended for it to actually strip leading whitespace from comments that are supposed to have it? This can break intentional alignment using spaces or tabs.
I thought about trying to preserve some whitespace, but ultimately I don't see how that can be practically done without passing judgement on how much whitespace the leading indent must be - I could possibly assume a space for the first line and a tab plus three spaces (or 7 spaces) for the second line, but that's a lot more complicated and still runs into a problem where it "normalizes" the whitespace on the first run, changing the user's comments in some way.
If I can't avoid normalizing some whitespace, I'd rather apply simpler heuristics that are easier to maintain and easier to explain.
Given json object constructed like this:
After converting it to string:
I get the following output:
Now parsing it back and printing again:
I get the following:
The whitespace keeps accumulating each time.
The text was updated successfully, but these errors were encountered: