Fixed #3158 causing wrong line wraps on text containing markup.