Skip to content

Commit

Permalink
fix colspan
Browse files Browse the repository at this point in the history
  • Loading branch information
siuying committed Jan 16, 2010
1 parent 585896d commit 5437ced
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/table_parser.rb
Expand Up @@ -4,5 +4,5 @@
require 'table_parser/parser'

module TableParser
VERSION = '0.5.5'
VERSION = '0.5.6'
end
6 changes: 4 additions & 2 deletions lib/table_parser/parser.rb
Expand Up @@ -23,7 +23,8 @@ def self.extract_column_headers(rows, dup_rows, dup_cols, has_header)
rows.first.collect do |col|
header = TableColumn.new(col)
headers << header
(header.colspan-1).times do
colspan = col["colspan"].to_i rescue 1
(colspan-1).times do
headers << TableColumn.new(col)
end
end
Expand All @@ -32,7 +33,8 @@ def self.extract_column_headers(rows, dup_rows, dup_cols, has_header)
rows.first.collect do |col|
header = TableColumn.new(nil)
headers << header
(header.colspan-1).times do
colspan = col["colspan"].to_i rescue 1
(colspan-1).times do
headers << TableColumn.new(nil)
end
end
Expand Down

0 comments on commit 5437ced

Please sign in to comment.