Distinguish links converted from raw text and made using formatting

If I’m understanding, you want to distinguish between

<a href="http://example.com">http://example.com</a> 
<a href="http://example.com">some text</a>

where the “some text” is not the href value.

I think a short amount of JavaScript working with the cooked could style them differently.

EDIT
As a proof of concept, this works for me on my localhost in Customize </body>

 $(document).on("ajaxComplete", function( event ) {
  let post_links = document.body.querySelectorAll(".contents .cooked a:not(.back):not(.mention)");
  let i = 0;
  for (i = 0; i < post_links.length; i++) {
      if ( post_links[i].href != post_links[i].textContent ) {
          post_links[i].style.outline = "1px solid #900";
      }
  }
});
6 个赞