Text formatter with some basic functionality, designed to output HTML