<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -101,6 +101,8 @@ module Prawn
        )                                 
              
        # update bounding box if not flowing from the previous page
+       # TODO: This may have a bug where the old margin is restored
+       # when the bounding box exits.
        @bounding_box = @margin_box if old_margin_box == @bounding_box              
      end
             </diff>
      <filename>lib/prawn/document.rb</filename>
    </modified>
    <modified>
      <diff>@@ -172,16 +172,17 @@ module Prawn
           renderable_data.each_with_index do |row,index|
             c = Prawn::Graphics::CellBlock.new(@document)
             row.each_with_index do |e,i|
-              c &lt;&lt; Prawn::Graphics::Cell.new(:document =&gt; @document, 
-                                             :text     =&gt; e, 
-                                             :width    =&gt; @col_widths[i],
-                                             :horizontal_padding =&gt; @horizontal_padding,
-                                             :vertical_padding =&gt; @vertical_padding,
-                                             :border   =&gt; @border,
-                                             :border_style =&gt; :sides )
+              c &lt;&lt; Prawn::Graphics::Cell.new(
+                :document =&gt; @document, 
+                :text     =&gt; e, 
+                :width    =&gt; @col_widths[i],
+                :horizontal_padding =&gt; @horizontal_padding,
+                :vertical_padding =&gt; @vertical_padding,
+                :border   =&gt; @border,
+                :border_style =&gt; :sides )    
             end
 
-            if c.height &gt; (x= y_pos - @document.margin_box.absolute_bottom)
+            if c.height &gt; y_pos - @document.margin_box.absolute_bottom
               draw_page(page_contents)
               @document.start_new_page
               if @headers
@@ -191,7 +192,6 @@ module Prawn
                 page_contents = []
                 y_pos = @document.y
               end
-
             end
 
             page_contents &lt;&lt; c
@@ -202,7 +202,6 @@ module Prawn
               draw_page(page_contents)
             end
 
-
           end
           @document.y -= @vertical_padding
         end</diff>
      <filename>lib/prawn/document/table.rb</filename>
    </modified>
    <modified>
      <diff>@@ -78,6 +78,7 @@ module Prawn
         font &quot;Helvetica&quot; unless fonts[@font]
 
         return wrapped_text(text,options) unless options[:at]
+        
         x,y = translate(options[:at])
         font_size(options[:size] || current_font_size) do
           font_name = font_registry[fonts[@font]]          
@@ -167,10 +168,7 @@ module Prawn
       private
 
       def move_text_position(dy)
-         if (y - dy) &lt; @margin_box.absolute_bottom
-           return start_new_page
-         end
-         self.y -= dy
+         (y - dy) &lt; @margin_box.absolute_bottom ? start_new_page : self.y -= dy       
       end
 
       def text_width(text,size)
@@ -187,9 +185,10 @@ module Prawn
 
           lines = text.lines
 
-          lines.each do |e|
+          lines.each do |e|    
+            
             move_text_position(@font_metrics.font_height(current_font_size) +
-                               @font_metrics.descender / 1000.0 * current_font_size)  
+                           @font_metrics.descender / 1000.0 * current_font_size)  
                                
                                
             add_content %Q{</diff>
      <filename>lib/prawn/document/text.rb</filename>
    </modified>
    <modified>
      <diff>@@ -357,7 +357,8 @@ module Prawn
         def kern_pairs_table
           return @kern_pairs_table if @kern_pairs_table
           
-          table = @ttf.get_table(:kern).subtables.find { |s| s.is_a? ::Font::TTF::Table::Kern::KerningSubtable0 }
+          table = @ttf.get_table(:kern).subtables.find { |s| 
+            s.is_a? ::Font::TTF::Table::Kern::KerningSubtable0 }
           
           if table
             @kern_pairs_table ||= table.kerning_pairs.inject({}) do |h,p|</diff>
      <filename>lib/prawn/font/metrics.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,8 @@ module Prawn
           segments = line.scan(/\S+|\s+/)
                                         
           segments.each do |segment|    
-            segment_width = string_width(segment, font_size, :kerning =&gt; options[:kerning]) 
+            segment_width = string_width(segment, font_size, 
+              :kerning =&gt; options[:kerning]) 
       
             if (accumulated_width + segment_width).round &gt; line_width.round
               output &lt;&lt; &quot;\n&quot;</diff>
      <filename>lib/prawn/font/wrapping.rb</filename>
    </modified>
    <modified>
      <diff>@@ -70,7 +70,11 @@ module Prawn
       x,y = translate(point)
       add_content(&quot;%.3f %.3f %.3f %.3f re&quot; % [ x, y - height, width, height ])      
     end
-                         
+       
+    ###########################################################
+    #  Higher level functions: May use relative coords        #   
+    ########################################################### 
+      
     # Sets line thickness to the &lt;tt&gt;width&lt;/tt&gt; specified.
     #
     def line_width=(width)
@@ -84,11 +88,6 @@ module Prawn
       @line_width || 1
     end
        
-    ###########################################################
-    #  Higher level functions: May use relative coords        #   
-    ########################################################### 
-     
-     
     # Draws a line from one point to another. Points may be specified as 
     # tuples or flattened argument list:
     #</diff>
      <filename>lib/prawn/graphics.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,8 @@ module Prawn
     #    end
     #
     def cell(point, options={})
-      Prawn::Graphics::Cell.new(options.merge(:document =&gt; self, :point =&gt; point)).draw
+      Prawn::Graphics::Cell.new(
+        options.merge(:document =&gt; self, :point =&gt; point)).draw
     end
   end
 
@@ -191,7 +192,8 @@ module Prawn
         end
 
         @cells.each do |e|
-          e.point  = [x - @document.bounds.absolute_left, y - @document.bounds.absolute_bottom]
+          e.point  = [x - @document.bounds.absolute_left, 
+                      y - @document.bounds.absolute_bottom]
           e.height = @height
           e.draw
           x += e.width</diff>
      <filename>lib/prawn/graphics/cell.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fbf50793597f1ebaed9b77395e9cacfc86b78bed</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/a22c3b568dd29e29bea254e2d99f89d87809e48a</url>
  <id>a22c3b568dd29e29bea254e2d99f89d87809e48a</id>
  <committed-date>2008-07-21T13:09:59-07:00</committed-date>
  <authored-date>2008-07-21T13:09:59-07:00</authored-date>
  <message>Cleanup more minor issues</message>
  <tree>c6f9ad67d55cbbe20c988a373a61835596cae77d</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
