<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,7 +31,7 @@ module Lighthouse::GitHooks
     
     def parse
       @commits.each do |commit|
-        commit.message.scan(/\[#([0-9]+)\s+(.*?)\]/) do |match|
+        commit.message.scan(/\[#([0-9]+)\s*(.*?)\]/) do |match|
           @changes &lt;&lt; parse_ticket(commit, match[0], match[1])
         end
       end
@@ -89,8 +89,10 @@ module Lighthouse::GitHooks
     
     def parse_ticket(commit, number, params)
       ticket = {'number' =&gt; number.to_i, 'commit' =&gt; commit}
-      params.scan(/(\w+):(\w+|'.*?')/) do |key, value|
-        ticket[key] = value.gsub(/^[&quot;'](.*)[&quot;']$/, '\1') if AUTHORIZED_KEYS.include?(key)
+      unless params.blank?
+        params.scan(/(\w+):(\w+|'.*?')/) do |key, value|
+          ticket[key] = value.gsub(/^[&quot;'](.*)[&quot;']$/, '\1') if AUTHORIZED_KEYS.include?(key)
+        end
       end
       ticket
     end
@@ -103,4 +105,4 @@ module Lighthouse::GitHooks
     
   end
   
-end
\ No newline at end of file
+end</diff>
      <filename>lib/lighthouse/git_hooks/ticket_updater.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>22a00fd88f9c87190111af0fed37a2d7a02b2722</id>
    </parent>
  </parents>
  <author>
    <name>Stephen Anderson</name>
    <email>stephen@bendycode.com</email>
  </author>
  <url>http://github.com/gwik/lighthouse-git-hooks/commit/6456c252d9e93813f0b34e20a111c01d369d07d0</url>
  <id>6456c252d9e93813f0b34e20a111c01d369d07d0</id>
  <committed-date>2009-01-07T13:19:26-08:00</committed-date>
  <authored-date>2009-01-07T13:19:26-08:00</authored-date>
  <message>Allow git comments like &quot;[#81] Some comment.&quot; to be sent to lighthouse.
They were being ignored because they didn't have any params to change
the ticket state.</message>
  <tree>3cc4a5367e1d7859901fde92db490c09155eb47f</tree>
  <committer>
    <name>Stephen Anderson</name>
    <email>stephen@bendycode.com</email>
  </committer>
</commit>
