pretty-php icon indicating copy to clipboard operation
pretty-php copied to clipboard

Review ad-hoc suppression of blank lines

Open lkrms opened this issue 1 year ago • 0 comments

  • [ ] 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.

lkrms avatar Jan 18 '25 07:01 lkrms