groue / GRMustache.swift

Flexible Mustache templates for Swift
http://mustache.github.com/
MIT License
594 stars 155 forks source link

Is it possible to detect plain text URLs and phone links and make it an actionable link? #68

Open csfelipe opened 5 years ago

csfelipe commented 5 years ago

Currently I use Mustache to display HTML articles that I retrieve from our web service.

I wanted to know if there's a way to make Mustache detect URLs and/or telephones without the href tag.

Mustache does its thing when we receive something like this:

  <p><a href=\ "http://www.instagram.com\">www.instagram.com</a>&nbsp;</p>
  <p><a href=\ "tel://+19145006953\" target=\ "_blank\">+19145006953</a></p>

But doesn't detect it anything when it's just raw:

<p>www.instagram.com</p>
<p>+19145006953</p>

Any suggestions? Thanks!