Add text.strip back in, get rid of continue/break, use standard indenting

Merged with upstream (sorry for not doing that before!)