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

Review ad-hoc suppression of blank lines #189

Open
2 tasks
lkrms opened this issue Jan 18, 2025 · 0 comments
Open
2 tasks

Review ad-hoc suppression of blank lines #189

lkrms opened this issue Jan 18, 2025 · 0 comments

Comments

@lkrms
Copy link
Owner

lkrms commented Jan 18, 2025

  • Consider statements like these for replacement with suppression of blank lines across a range of tokens, so blank lines between adjacent comments are collapsed in the given context:

    • $token->Whitespace |= Space::NO_BLANK_...
    • $items->setTokenWhitespace(Space::NO_BLANK_...)
  • Don't downgrade blank lines to newlines in PreserveNewlines::maybePreserveNewlineAfter(). It would be preferable for newlines in the input to be preserved as-is, and for blank lines to be suppressed as needed, so presets and (future) third-party rules can preserve blank lines that are suppressed by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant