better ws management in text pretty printing