Fixed bugs in hexeText markup

Fixed bug in which bold italics did not work.
Fixed a parsing bug with templates.