esdoc-plugins
esdoc-plugins copied to clipboard
mailto link is broken esdoc-publish-html-plugin ManualDocBuilder.js
In esdoc-publish-html-plugin/src/Builder/ManualDocBuilder.js
$root.find('a').each((i, el) => {
const $el = (0, _cheerio2.default)(el);
const href = $el.attr('href');
if (!href) return;
if (href.match(/^http[s]?:/)) return;
if (href.charAt(0) === '/') return;
if (href.charAt(0) === '#') return;
$el.attr('href', `./manual/${href}`);
});
This code adds './manual/' to the mailto address inside of:
<a href="mailto:[email protected]">[email protected]</a>
which breaks the link. Please help to fix this. Maybe add a line:
if (href.match(/^mailto:)) return;