added support for character styles and h1 elements