Skip to content

Commit b76ddaf

Browse files
author
hugur
committed
add mailto the the external <Link/> check
1 parent d427a0f commit b76ddaf

File tree

1 file changed

+1
-1
lines changed
  • gatsby-theme-w3f/src/components/default

1 file changed

+1
-1
lines changed

gatsby-theme-w3f/src/components/default/Link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Link = ({ to, title, children, ...other }) => {
1919
};
2020

2121
const testExternalLink = href => {
22-
const regex = new RegExp('^(http|https)://', 'i');
22+
const regex = new RegExp('^(http://|https://|mailto:)', 'i');
2323
const match = regex.test(href);
2424
return match;
2525
};

0 commit comments

Comments
 (0)