<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,12 +10,12 @@ cat &amp;lt;&amp;lt;'RUBYEOF' &amp;gt; /tmp/cucumber-$$.rb
 
 require ENV['TM_BUNDLE_SUPPORT'] + &quot;/lib/cucumber/mate/table_aligner&quot;
 
-puts(Cucumber::Mate::TableAligner.new.align(ENV['TM_SELECTED_TEXT']))
+puts(Cucumber::Mate::TableAligner.new.align(STDIN.readlines))
 RUBYEOF
 
 ${TM_RUBY:-ruby} -w -Ku /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status&lt;/string&gt;
 	&lt;key&gt;fallbackInput&lt;/key&gt;
-	&lt;string&gt;none&lt;/string&gt;
+	&lt;string&gt;document&lt;/string&gt;
 	&lt;key&gt;input&lt;/key&gt;
 	&lt;string&gt;selection&lt;/string&gt;
 	&lt;key&gt;keyEquivalent&lt;/key&gt;</diff>
      <filename>Commands/Align Table Cells.tmCommand</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,18 @@
 module Cucumber
   module Mate
     class TableAligner
-      def align(table_text)
-        align_all(table_text.split(&quot;\n&quot;)).join(&quot;\n&quot;)
-      end
-
-      private
-
-      def align_all(lines)
+      def align(lines)
         group_by_tables(lines).map do |group|
           if(group.is_a? Array)
             align_table(group)
           else
             group
           end
-        end
+        end.flatten
       end
 
+      private
+
       def group_by_tables(lines)
         current_table = []
         grouped = []</diff>
      <filename>Support/lib/cucumber/mate/table_aligner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,36 +5,51 @@ module Cucumber
   module Mate
     describe TableAligner do
       it &quot;should align a simple table&quot; do
-        unaligned = &quot;  |    a |b|\n&quot; +
-                    &quot; |c|  d   |&quot;
+        unaligned = [
+          &quot;  |    a |b|&quot;,
+          &quot; |c|  d   |&quot;
+        ]
 
-        expected = &quot;  | a | b |\n&quot; +
-                   &quot;  | c | d |&quot;
+        expected = [
+          &quot;  | a | b |&quot;,
+          &quot;  | c | d |&quot;
+        ]
 
         TableAligner.new.align(unaligned).should == expected
       end
 
       it &quot;should align multiple tables&quot; do
-        unaligned = &quot;  |    a |b|\n&quot; +
-                    &quot; |c|  d   |\n&quot; +
-                    &quot;\n&quot; +
-                    &quot;   |x  | y|zz|\n&quot; +
-                    &quot; |1|2|3|&quot;
+        unaligned = [
+          &quot;  |    a |b|&quot;,
+          &quot; |c|  d   |&quot;,
+          &quot;&quot;,
+          &quot;   |x  | y|zz|&quot;,
+          &quot; |1|2|3|&quot;
+        ]
 
-        expected = &quot;  | a | b |\n&quot; +
-                   &quot;  | c | d |\n&quot; +
-                   &quot;\n&quot; +
-                   &quot;   | x | y | zz |\n&quot; +
-                   &quot;   | 1 | 2 | 3  |&quot;
+        expected = [
+          &quot;  | a | b |&quot;,
+          &quot;  | c | d |&quot;,
+          &quot;&quot;,
+          &quot;   | x | y | zz |&quot;,
+          &quot;   | 1 | 2 | 3  |&quot;
+        ]
 
         TableAligner.new.align(unaligned).should == expected
       end
 
       it &quot;should align a table with multi-byte UTF8 values&quot; do
-        unaligned = &quot;   | a |b|\n&quot; +
-                    &quot;   |&#247;|  d  |&quot;
-        TableAligner.new.align(unaligned).should == &quot;   | a | b |\n&quot; +
-                                                    &quot;   | &#247; | d |&quot;
+        unaligned = [
+          &quot;   | a |b|&quot;,
+          &quot;   |&#247;|  d  |&quot;
+        ]
+        
+        expected = [
+          &quot;   | a | b |&quot;,
+          &quot;   | &#247; | d |&quot;
+        ]
+        
+        TableAligner.new.align(unaligned).should == expected
       end
     end
   end</diff>
      <filename>Support/spec/cucumber/mate/table_aligner_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>06f642c011517de5832f7488a3c7d22ada6c862e</id>
    </parent>
  </parents>
  <author>
    <name>Darrin Holst</name>
    <email>darrinholst@gmail.com</email>
  </author>
  <url>http://github.com/drnic/cucumber-tmbundle/commit/358e1d5af1d6fa6e2de6671abec40a6619bd7a63</url>
  <id>358e1d5af1d6fa6e2de6671abec40a6619bd7a63</id>
  <committed-date>2009-09-27T19:13:28-07:00</committed-date>
  <authored-date>2009-09-27T19:13:28-07:00</authored-date>
  <message>read as array instead of string</message>
  <tree>dbf023dc65d56a383839e9b0902c2e1d3c6d0652</tree>
  <committer>
    <name>Darrin Holst</name>
    <email>darrinholst@gmail.com</email>
  </committer>
</commit>
