Commit f86ecc27 authored by Michael Witrant's avatar Michael Witrant
Browse files

find amendments

parent 8f1665e0
......@@ -28,4 +28,21 @@ end
text = doc.xpath('//office:text').first
raise "no office:text found" unless text
amend_start = nil
amend_nodes = []
text.children.each_with_index do |node, i|
if"[text()='<Amend>']").size > 0
amend_start = i
elsif"[text()='</Amend>']").size > 0
if amend_start.nil?
raise "amend end before amend start"
amend_end = i
amend_nodes << text.children.slice(amend_start..amend_end)
amend_start = nil
p amend_nodes.length
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment