# Distinguish links converted from raw text and made using formatting

**URL:** <https://meta.discourse.org/t/distinguish-links-converted-from-raw-text-and-made-using-formatting/77503>\
**Category:** Feature\
**Created:** [Janeiro 8, 2018, 7:21pm UTC](https://meta.discourse.org/t/distinguish-links-converted-from-raw-text-and-made-using-formatting/77503 "2018-01-08T19:21:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [Janeiro 9, 2018, 5:04am UTC](https://meta.discourse.org/t/distinguish-links-converted-from-raw-text-and-made-using-formatting/77503/6 "2018-01-09T05:04:31Z")

</div>

If I’m understanding, you want to distinguish between

```html
<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>`

```plaintext
 $(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";
      }
  }
});

```

---

_[View the full topic](https://meta.discourse.org/t/distinguish-links-converted-from-raw-text-and-made-using-formatting/77503)._
