fix: better whitespace handling inside printer (#18638)