NFPA 30A - Code for Motor Fuel Dispensing Facilities and Repair Garages. Para 9.2.5.1 - Sources of Ignition - The motors of all equipment being fueled shall be shut off during the fueling operation except for emergency generators, pumps, and so forth, where continuing operation is essential. It's a "code" that is enforceable by an "authority having jurisdiction". Lots of people don't pay it any mind though, because it most likely won't be enforced.
I know the the sticker on pumps specifically stated gas engines, but that was a long time ago.
Fwiw - I have a diesel engine.