fix highlight after updating snippet