apply formatting for segments with :format directive