You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/03/25 19:07:06 UTC
[whimsy.git] [1/1] Commit b4de66a: skip over, then retain, note
Commit b4de66a757c701a3f55bb5e2adc4397fdeb96c80:
skip over, then retain, note
Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>
------------------------------------------------------------
lib/whimsy/asf/member.rb | +++ ---
------------------------------------------------------------
6 changes: 3 additions, 3 deletions.
------------------------------------------------------------
diff --git a/lib/whimsy/asf/member.rb b/lib/whimsy/asf/member.rb
index 36fdcc7..64fc6c9 100644
--- a/lib/whimsy/asf/member.rb
+++ b/lib/whimsy/asf/member.rb
@@ -92,11 +92,11 @@ def self.sort(source)
# sort sections that contain names
sections.map! do |section|
- next section unless section.start_with? ' *) '
+ next section unless section =~ /^\s\*\)\s/
# split into entries, and normalize those entries
entries = section.split(/^\s\*\)\s/)
- entries.shift
+ header = entries.shift
entries.map! {|entry| " *) " + entry.strip + "\n\n"}
# sort the entries
@@ -104,7 +104,7 @@ def self.sort(source)
ASF::Person.sortable_name(entry[/\)\s(.*?)\s*(\/\*|$)/, 1])
end
- entries.join
+ header + entries.join
end
sections.join