move path parsing logic spec all into formatter.path