table_parser 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,8 @@ module TableParser
8
8
  def self.extract_table(doc, xpath)
9
9
  rows = []
10
10
  table = doc.xpath(xpath)
11
- rows = table.xpath("./tr").collect do |row|
12
- row.xpath("./td|./th").collect do |col|
11
+ rows = table.xpath("./thead/tr|./tr").collect do |row|
12
+ row.xpath("./td|./th|./tbody/tr|./tbody/th").collect do |col|
13
13
  col
14
14
  end
15
15
  end
data/lib/table_parser.rb CHANGED
@@ -4,5 +4,5 @@ require 'table_parser/table'
4
4
  require 'table_parser/parser'
5
5
 
6
6
  module TableParser
7
- VERSION = '0.7.0'
7
+ VERSION = '0.7.1'
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_parser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 0
10
- version: 0.7.0
9
+ - 1
10
+ version: 0.7.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Francis Chong