It turns out that I need to call skipNewLine before calling hasNewLine in order to figure out if there's an empty line right after. Oops. Fixes #504