# File lib/maruku/structures_iterators.rb, line 40 def replace_each_string(&block) for c in @children if c.kind_of? MDElement c.replace_each_string(&block) end end processed = [] until @children.empty? c = @children.shift if c.kind_of? String result = block.call(c) [*result].each do |e| processed << e end else processed << c end end @children = processed end