Skip to content

Commit

Permalink
Add mailto: to email addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
ulyssesdotcodes committed Dec 22, 2014
1 parent 18c8e8a commit 90ce76c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ else if (element.getParent() != null
break;
case LINK:
case AUTOLINK:
setSpan(builder, new URLSpan(element.getAttribute("link")));
String link = element.getAttribute("link");
if (Patterns.EMAIL_ADDRESS.matcher(link).matches()) {
link = "mailto:" + link;
}
setSpan(builder, new URLSpan(link));
break;
case BLOCK_QUOTE:
// We add two leading margin spans so that when the order is reversed,
Expand Down

0 comments on commit 90ce76c

Please sign in to comment.