fixed bug in -paragraphRanges, optimized to avoid slow splitting