updated string formatter to ignore comments properly