FIX Ensure mailto links work as expected.

This commit is contained in:
Guy Sartorelli 2022-05-05 15:54:32 +12:00
parent 6fe74b1fd8
commit 12a1d999ed
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(