function markdownToRemark(markdown, remarkPlugins) {
  const processor = unified()
    .use(markdownToRemarkPlugin, { fences: true, commonmark: true })
    .use(markdownToRemarkRemoveTokenizers, { inlineTokenizers: ['url'] })
    .use(remarkParseShortcodes, { plugins: getEditorComponents() })
    .use(remarkAllowHtmlEntities)
    .use(remarkSquashReferences)
    .use(remarkPlugins);

  /**
   * Parse the Markdown string input to an MDAST.
   */
  const parsed = processor.parse(markdown);

  /**
   * Further transform the MDAST with plugins.
   */
  const result = processor.runSync(parsed);

  return result;
}
Deserialize a Markdown string to an MDAST.