#### Improve blank line detection between statements (#18736 by @fisker)

<!-- prettier-ignore -->
```jsx
// Input
const exports = text
  .matchAll(/(?<=\n)exports\.(?<specifier>\w+) = \k<specifier>;/g)
  .map((match) => match.groups.specifier)
  .toArray()
;

foo();

// Prettier stable (--no-semi)
const exports = text
  .matchAll(/(?<=\n)exports\.(?<specifier>\w+) = \k<specifier>;/g)
  .map((match) => match.groups.specifier)
  .toArray();
foo();

// Prettier main
const exports = text
  .matchAll(/(?<=\n)exports\.(?<specifier>\w+) = \k<specifier>;/g)
  .map((match) => match.groups.specifier)
  .toArray();

foo();
```
