Skip to content

Conversation

@arvindth
Copy link
Member

From SEC-283, it looks like we don't want the extra whitespace added after comment prefixes. If that is the only issue, then this change will fix it. Before this change:

#comment1
a=b
# comment2
c=d

would change to

# comment1
a=b
# comment2
c=d

After this change though, the original file would change to:

#comment1
a=b
#comment2
c=d

Note that although comment1 has retained its original spacing, the whitespace between comment2 and its prefix gets stripped out. To retain and passthrough all such formatting would require additional changes to the underlying properties parser library.

@arvindth arvindth requested a review from a team as a code owner July 30, 2019 22:14
Copy link
Contributor

@DABH DABH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like the real ask here would be to not change commented lines at all. But if this change results in fewer changes than the current state, then sounds good to me.

@DABH DABH requested a review from ybyzek July 30, 2019 22:37
@arvindth
Copy link
Member Author

I've posted a PR to preserve whitespace on all commented lines to the upstream library magiconair/properties. I've also made corresponding changes on my cli branch.

If this PR isn't enough, then once the upstream accepts my preserveFormatting changes, I'll post my branch as a PR.

@DABH
Copy link
Contributor

DABH commented Aug 2, 2019

@arvindth oh cool, yeah this is what we talked about on slack, I see ; ) Sounds good -- we can wait a few days and see if they accept the PR

@arvindth
Copy link
Member Author

Closing due to a more comprehensive fix in PR #260

@arvindth arvindth closed this Aug 19, 2019
@arvindth arvindth deleted the ath-SEC-283-removeSpaceAfterPrefix branch December 9, 2019 22:36
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.

2 participants