Factorize format detection #10
Peanuts: fix function param