TypeError: line.replace is not a function

Uh oh. Is that really a thing? I never heard of that before. I’ve got a chapter in Tea and Scones that’s sitting at 586,000 words, and it passes Quicksave. What causes the “too long” error?