lib/maruku/element.rb
def replace_each_string(&block)
      @children.map! do |c|
        next yield c if c.is_a?(String)
        c.replace_each_string(&block)
        c
      end
      @children.flatten! unless self.node_type == :table
    end
# Iterates through each String child node of this element,
# replacing it with the result of the block.
# This includes deeply-nested child nodes.
#
# This destructively modifies this node and its children.
#
# @todo Make this non-destructive
Iterates through each String child node of this element,
replacing it with the result of the block.
This includes deeply-nested child nodes.

This destructively modifies this node and its children.
Iterates through each String child node of this element replacing it with the result of the block . This includes deeply - nested child nodes . This destructively modifies this node and its children .
def replace_each_string(&block)
      @children.map! do |c|
        next yield c if c.is_a?(String)
        c.replace_each_string(&block)
        c
      end
      @children.flatten! unless self.node_type == :table
    end
def replace_each_string ( & block ) @children . map! do | c | next yield c if c . is_a? ( String ) c . replace_each_string ( & block ) c end @children . flatten! unless self . node_type == :table end
Iterates through each String child node of this element,
replacing it with the result of the block.
Iterates through each String child node of this element replacing it with the result of the block .
block
todo
Make this non-destructive
Make this non - destructive