def split(sections)
      docs_blocks, code_blocks = [], []
      sections.each do |docs,code|
        docs_blocks << docs.join("\n")
        code_blocks << code.map do |line|
          tabs = line.match(/^(\t+)/)
          tabs ? line.sub(/^\t+/, '  ' * tabs.captures[0].length) : line
        end.join("\n")
      end

      [docs_blocks, code_blocks]
    end
def split(sections)
      docs_blocks, code_blocks = [], []
      sections.each do |docs,code|
        docs_blocks << docs.join("\n")
        code_blocks << code.map do |line|
          tabs = line.match(/^(\t+)/)
          tabs ? line.sub(/^\t+/, '  ' * tabs.captures[0].length) : line
        end.join("\n")
      end

      [docs_blocks, code_blocks]
    end
Take the list of paired *sections* two-tuples and split into two
 separate lists: one holding the comments with leaders removed and
 one with the code blocks