Fix digesting templates with mixed formats
#32282

javan wants to merge javan:fix-digesting-mixed-formats into rails:master

We do not currently have an analysis of these two commits