I believe it’s the other way around, gas will affect rubber far faster and more damaging than diesel will, especially now that it’s a 10% ethanol mix.
You’re mixed up.
Natural rubber was the standard material for gasoline fuel hoses until the alcohol problem came along, but natural rubber has never been used in diesel fuel systems.
Neoprene was the common solution to the alcohol problem until the conversion to fuel injection systems that use plastics for the flexible portions of the system.