3: handle leading newlines separately