def render(node)
      node = Marshal.load(Marshal.dump(node)) # Clone the node

      node.fetch('marks', []).each do |mark|
        renderer = mappings[mark['type']]
        return mappings[nil].new(mappings).render(mark) if renderer.nil? && mappings.key?(nil)
        node['value'] = renderer.new(mappings).render(node) unless renderer.nil?
      end

      node['value']
    end
def render(node)
      node = Marshal.load(Marshal.dump(node)) # Clone the node

      node.fetch('marks', []).each do |mark|
        renderer = mappings[mark['type']]
        return mappings[nil].new(mappings).render(mark) if renderer.nil? && mappings.key?(nil)
        node['value'] = renderer.new(mappings).render(node) unless renderer.nil?
      end

      node['value']
    end
Renders text nodes with all markings.