src/language-js/printer-estree.js/isTheOnlyJSXElementInMarkdown
function isTheOnlyJSXElementInMarkdown(options, path) {
  if (options.parentParser !== "markdown") {
    return false;
  }

  const node = path.getNode();

  if (!node.expression || !isJSXNode(node.expression)) {
    return false;
  }

  const parent = path.getParentNode();

  return parent.type === "Program" && parent.body.length == 1;
}