Electrophilic substitution of benzofuran and indole occurs selectively at C2 and C3 respectively. My textbook says that results from "different relative contributions from the benzene ring and the heteroatom towards stabilization of the alternative cationic intermediate", as shown in the attachment. But I still don't get it. How would the difference in the two heteroatoms contribute distinct regioselectivities?
I've tried drawing the resonance contributors of the intermediates, but no difference was found in the case of NH and O.