Tweaked to avoid ending bold/italics with an excaped character