Skip to content

Commit

Permalink
Merge pull request #20 from w3f-webops/fix/mailto-external-link
Browse files Browse the repository at this point in the history
Fix/mailto external link
  • Loading branch information
4www authored Apr 13, 2022
2 parents 76841cf + d39a6ce commit 6728700
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gatsby-theme-w3f/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@w3f/gatsby-theme-w3f",
"private": false,
"description": "w3f gatsby theme",
"version": "0.0.19",
"version": "0.0.20",
"author": "W3F <[email protected]>",
"keywords": [
"gatsby"
Expand Down
2 changes: 1 addition & 1 deletion gatsby-theme-w3f/src/components/default/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Link = ({ to, title, children, ...other }) => {
};

const testExternalLink = href => {
const regex = new RegExp('^(http|https)://', 'i');
const regex = new RegExp('^(http:\/\/|https:\/\/|mailto:)', 'i');
const match = regex.test(href);
return match;
};
Expand Down

0 comments on commit 6728700

Please sign in to comment.