Increment y when replacing chars with a newline