function normalizeMarks(node) {
    if (node.marks) {
      node.marks.forEach(mark => {
        node[mark.type] = true;
      });
    }

    return node;
  }
Add the current node's mark type to the marks collected from parent
mark nodes, if any.