Add text nodes

This adds support for text nodes with the ability to replace newlines with something else (two spaces by default). String nodes haven't changed so could still have linebreaks in but I'd suggest we remove this ability in future.