function processMarkNode(node, parentMarks = []) {
    /**
     * Add the current node's mark type to the marks collected from parent
     * mark nodes, if any.
     */
    const markType = markMap[node.type];
    const marks = markType
      ? [...parentMarks.filter(({ type }) => type !== markType), { type: markType }]
      : parentMarks;

    const children = flatMap(node.children, child =>
      normalizeMarks(processMarkChild(child, marks)),
    );

    return children;
  }
Remaining nodes simply need mark data added to them, and to then be
added into the cumulative children array.