Merge pull request #240 from creative-commoners/pulls/master/mailto-links
FIX Ensure mailto links work as expected.
This commit is contained in:
commit
0c11aaf85f
|
@ -41,6 +41,15 @@ const rewriteLink = (
|
||||||
const currentNode = getCurrentNode();
|
const currentNode = getCurrentNode();
|
||||||
const version = getCurrentVersion();
|
const version = getCurrentVersion();
|
||||||
|
|
||||||
|
// mailto links
|
||||||
|
if (href.startsWith('mailto:')) {
|
||||||
|
return createElement(
|
||||||
|
'a',
|
||||||
|
{ href },
|
||||||
|
domToReact(children, parseOptions)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// hash links
|
// hash links
|
||||||
if (href.startsWith('#')) {
|
if (href.startsWith('#')) {
|
||||||
return createElement(
|
return createElement(
|
||||||
|
|
Loading…
Reference in New Issue