def sections(heading_re)
      hash = {}
      heading = ""
      remainder = text

      until remainder.empty?
        hash[heading], heading, remainder = remainder.partition(heading_re)
      end

      hash
    end
def sections(heading_re)
      hash = {}
      heading = ""
      remainder = text

      until remainder.empty?
        hash[heading], heading, remainder = remainder.partition(heading_re)
      end

      hash
    end
Parses the changelog into a hash, where the keys of the hash are the
 Markdown/rdoc headings matching the specified heading regexp, and values
 are the content delimited by those headings.

 E.g.
 { "## v1.0.1\n" => "\nRelease notes for 1.0.1.\n" }