lib/sup/mbox.rb in sup-0.2 vs lib/sup/mbox.rb in sup-0.3

- old
+ new

@@ -28,20 +28,22 @@ /^(Date):\s+(.*?)\s*$/i, /^(References):\s+(.*?)\s*$/i, /^(In-Reply-To):\s+(.*?)\s*$/i, /^(Reply-To):\s+(.*?)\s*$/i, /^(List-Post):\s+(.*?)\s*$/i, + /^(List-Subscribe):\s+(.*?)\s*$/i, + /^(List-Unsubscribe):\s+(.*?)\s*$/i, /^(Status):\s+(.*?)\s*$/i: header[last = $1] = $2 when /^(Message-Id):\s+(.*?)\s*$/i: header[mid_field = last = $1] = $2 ## these next three can occur multiple times, and we want the ## first one when /^(Delivered-To):\s+(.*)$/i, /^(X-Original-To):\s+(.*)$/i, /^(Envelope-To):\s+(.*)$/i: header[last = $1] ||= $2 when /^$/: break - when /:/: last = nil # some other header we don't care about + when /^\S+: /: last = nil # some other header we don't care about else header[last] += " " + line.chomp.gsub(/^\s+/, "") if last end end