src/language-markdown/printer-markdown.js/printChildren
function printChildren(path, options, print, events = {}) {
  const { postprocessor } = events;
  const processor = events.processor || (() => print());

  const node = path.getValue();
  const parts = [];

  let lastChildNode;

  path.each((childPath, index) => {
    const childNode = childPath.getValue();

    const result = processor(childPath, index);
    if (result !== false) {
      const data = {
        parts,
        prevNode: lastChildNode,
        parentNode: node,
        options,
      };

      if (shouldPrePrintHardline(childNode, data)) {
        parts.push(hardline);

        // Can't find a case to pass `shouldPrePrintTripleHardline`
        /* istanbul ignore next */
        if (lastChildNode && TRAILING_HARDLINE_NODES.has(lastChildNode.type)) {
          if (shouldPrePrintTripleHardline(childNode, data)) {
            parts.push(hardline);
          }
        } else {
          if (
            shouldPrePrintDoubleHardline(childNode, data) ||
            shouldPrePrintTripleHardline(childNode, data)
          ) {
            parts.push(hardline);
          }

          if (shouldPrePrintTripleHardline(childNode, data)) {
            parts.push(hardline);
          }
        }
      }

      parts.push(result);

      lastChildNode = childNode;
    }
  }, "children");

  return postprocessor ? postprocessor(parts) : parts;
}