Skip to content

Commit 6728700

Browse files
authored
Merge pull request #20 from w3f-webops/fix/mailto-external-link
Fix/mailto external link
2 parents 76841cf + d39a6ce commit 6728700

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gatsby-theme-w3f/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@w3f/gatsby-theme-w3f",
33
"private": false,
44
"description": "w3f gatsby theme",
5-
"version": "0.0.19",
5+
"version": "0.0.20",
66
"author": "W3F <[email protected]>",
77
"keywords": [
88
"gatsby"

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)