function markdownToHtml(markdownString) {
  // Compile Markdown to HTML
  let htmlString = marked.marked(markdownString);

  // Sanitize HTML String
  htmlString = sanitize(htmlString);

  // Replace anchor tags' href attribute with custom onclick listener
  htmlString = htmlString.replace(/<a(.*)href=['"](.*)['"](.*)>(.*)<\/a>/g, '<a$1onclick="openLink(\'$2\')"$3>$4</a>');

  return htmlString;
}
Converts a string of Markdown to a string
of HTML.

@param {string} markdownString
String containing Markdown