Merge pull request #240 from creative-commoners/pulls/master/mailto-links

FIX Ensure mailto links work as expected.
This commit is contained in:
Steve Boyd 2022-05-20 12:25:21 +12:00 committed by GitHub
commit 0c11aaf85f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -41,6 +41,15 @@ const rewriteLink = (
const currentNode = getCurrentNode();
const version = getCurrentVersion();
// mailto links
if (href.startsWith('mailto:')) {
return createElement(
'a',
{ href },
domToReact(children, parseOptions)
);
}
// hash links
if (href.startsWith('#')) {
return createElement(