Method: GitHubChangelogGenerator::Reader#parse
- Defined in:
- lib/github_changelog_generator/reader.rb
permalink #parse(data) ⇒ Array<Hash>
Parse the given ChangeLog data into a list of Hashes
71 72 73 74 75 76 77 78 79 80 |
# File 'lib/github_changelog_generator/reader.rb', line 71 def parse(data) sections = data.split(/^## .+?$/) headings = data.scan(/^## .+?$/) headings.each_with_index.map do |heading, index| section = parse_heading(heading) section["content"] = sections.at(index + 1) section end end |