It replaces plain text inside ref tags with a template. The template displays in the article, but not in the visual diff.
Reported by @Lent at https://www.mediawiki.org/wiki/Topic:Vj829wt7uhj3ktv6
Minimal test case
*Create a multi-line reference (<ref>Foo<p>bar</p></ref>)
*Change both lines <ref>Foooo<p>bazzz</p></ref>
*View visual diff