One of the main reasons for this shift in thinking is the discovery of new pterosaur fossils with preserved stomach contents. In 2011, a team of researchers led by David Hone from the University of Southampton in the United Kingdom announced the discovery of a pterosaur fossil from the Isle of Wight that contained the remains of a small mammal in its stomach. This finding suggested that at least some pterosaurs were capable of preying on land animals.
In 2018, another team of researchers led by Michael O'Sullivan from the University College Dublin in Ireland announced the discovery of a pterosaur fossil from County Clare in Ireland that contained the remains of fish scales in its stomach. This finding further supported the idea that pterosaurs were not exclusively carnivorous.
In addition to the fossil evidence, there is also some anatomical evidence that suggests that some pterosaurs may have been able to eat plants. For example, some pterosaurs had long, toothless jaws that would have been well-suited for straining plants from the water. Others had short, sharp teeth that would have been ideal for cutting through tough plant material.
Of course, it is important to note that not all pterosaurs may have been herbivorous or even omnivorous. Some pterosaurs, such as the giant pteranodons, were likely still primarily carnivorous, relying on their long, sharp beaks to catch fish and other animals.
Nevertheless, the growing body of evidence suggests that the traditional view of pterosaurs as exclusively carnivorous may need to be revised. It is likely that some pterosaurs had a more varied diet, including both plant and animal matter, depending on their size, shape, and habitat.