fix stripping for wrapped text
Merge pull request #2677 from kived/textwrap-strip

fix stripping for wrapped text