We have a script that paginates text on a web page. There are currently a couple of bugs in the code that give strange outputs and need fixing.
The script works in one of three different modes: word, sentence and paragraph.
Paragraph Mode: seems to hang when there's more than a few hundred words of content.
All Modes: content is removed if there's no space at the end of a line (after ".")
There may be other minor issues once you delve into the code. We can provide documentation of desired final functionality by way of specification.