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

Retain significant whitespace in nested, indented #if directives #1867

Merged
merged 2 commits into from
Aug 19, 2021

Conversation

kentcb
Copy link
Contributor

@kentcb kentcb commented Aug 13, 2021

This one was tricky to debug, at least for me. The root of the problem was that getTokenizedHashes' inner processLine function was rewriting some tokens with an offset, but not adjusting others. This meant that the significant whitespace ended up before the #if rather than after it where it belonged.

Fixes #1866

Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Kent good sir this is a wonderful fix. Many thanks for this!
Apologies for the slow response as I'm currently on holiday with limited access from time to time.
Would you like to have a hotfix release for this problem?

@nojaf nojaf merged commit a80f888 into fsprojects:master Aug 19, 2021
@kentcb kentcb deleted the fix-1866 branch August 20, 2021 01:06
@kentcb
Copy link
Contributor Author

kentcb commented Aug 20, 2021

No problem at all @nojaf - I hope you're having a great break!

No need for a release for me yet. I've got a few more fixes to do before Fantomas can successfully format our (complex) code base.

@nojaf
Copy link
Contributor

nojaf commented Sep 22, 2021

Hi @kentcb, how are things going for you?
I wanted to follow up on this as you made some PR's that felt specific to format a certain codebase.
Any luck? Anything I can help you out on?

@kentcb
Copy link
Contributor Author

kentcb commented Sep 24, 2021

Hi @nojaf! Thanks for following up. Unfortunately (fortunately?), I spend a limited amount of time on open source work these days, and I've prioritized some other projects ahead of these changes. I do plan on getting back to them, but might be a little while before I do.

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.

indented #if directive inside another non-indented #if directive drops significant whitespace
2 participants