Add nil-check when clearing the active formatting elements upto last marker
Add nil-check when clearing the active formatting elements upto last marker

iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit