Fixes an issue with empty strings, textlines and :>> operator

This branch is built on the previous pull request, so once that's approved I'll rebase.