esdoc-plugins icon indicating copy to clipboard operation
esdoc-plugins copied to clipboard

mailto link is broken esdoc-publish-html-plugin ManualDocBuilder.js

Open niwin opened this issue 7 years ago • 0 comments

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;

niwin avatar Dec 06 '17 19:12 niwin