Whitespace trimming has to be done first
Prevent looping for paragraphs without final period

We simply inserted a stopmarker. Possible occurences, even though unlikely, in
the original text will be masked and later unmasked.
This stopmarker ensures that all loops will finally terminate even though the
final sentence of a paragraph might not end in a full stop.