src/language-markdown/printer-markdown.js/printTitle
function printTitle(title, options) {
  if (!title) {
    return "";
  }
  if (title.includes('"') && title.includes("'") && !title.includes(")")) {
    return ` (${title})`; // avoid escaped quotes
  }
  // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split
  const singleCount = title.split("'").length - 1;
  const doubleCount = title.split('"').length - 1;
  const quote =
    singleCount > doubleCount
      ? '"'
      : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"';
  title = title.replace(new RegExp(`(${quote})`, "g"), "\\$1");
  return ` ${quote}${title}${quote}`;
}