Skip to content

Commit

Permalink
Fixes sort script.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfurrow committed Oct 11, 2024
1 parent 56ff401 commit 739fb3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace :yaml do
task :sort do
# We're going to assume each entry starts with `- city`, as shown in the README
contents = File.read("data/events.yml")
entries = contents.split("- city: ")[1...-1]
entries = contents.split("- city: ").drop(1)
new_entries = entries
.map { |e| { name: e.split("\n").first, entry: e } }
.sort { |l, r| l[:name] <=> r[:name] }
Expand Down

0 comments on commit 739fb3e

Please sign in to comment.