Skip to content

Commit

Permalink
force row sorting to ensure ordering with all ruby versions
Browse files Browse the repository at this point in the history
* see \#2
  • Loading branch information
tardate committed Jul 31, 2012
1 parent 6386c76 commit a342446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pdf/reader/turtletext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 91,10 @@ def text_in_region(xmin,xmax,ymin,ymax,page=1)
row = []
text_row.each do |x,element|
if x >= xmin && x<= xmax
row << element
row << [x,element]
end
end
box << row unless row.empty?
box << row.sort{|a,b| a.first <=> b.first }.map(&:last) unless row.empty?
end
end
box
Expand Down

0 comments on commit a342446

Please sign in to comment.