Refactor ExtractsRef#extracts_ref to be clearer
What does this MR do?
This method has grown a lot over time. One thing that makes the control
flow quite confusing is that we don't return early, but always do
something with the pair
variable at the end of the method.
Splitting this method into two methods means that we can return early from the core logic, making that part easier to understand, while doing our final string manipulation in the calling method.
Closes #233471 (closed). Originally suggested by @allison.browne - thanks!