From 9a85fa40582347e39e7824e0242d53d834c9dca6 Mon Sep 17 00:00:00 2001 From: Michael Witrant Date: Sun, 31 Mar 2013 17:29:02 +0200 Subject: [PATCH] find amendment table --- extract_amendments.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extract_amendments.rb b/extract_amendments.rb index 93f00dd..c28da18 100755 --- a/extract_amendments.rb +++ b/extract_amendments.rb @@ -69,6 +69,14 @@ amend_nodes.each do |nodes| article: article, } debug amendment + + tables = nodes.css('table|table') + raise "amendment table not found" if tables.size == 0 + raise "too many tables" if tables.size > 1 + table = tables.first + + + amendments << amendment break if parse_only_one -- GitLab