Commit d251f005 authored by Michael Witrant's avatar Michael Witrant

extract justification

parent 915b73a4
......@@ -141,6 +141,15 @@ class AmendmentExtractor
debug changes: changes
amendment.changes = changes
if justification_title_parent_node = nodes.detect { |node| node.search("[text()='<TitreJust>']").size > 0 }
justification_title_index = nodes.index(justification_title_parent_node)
justification_node = nodes[justification_title_index + 1]
justification_text = justification_node.text
debug justification_text: justification_text
amendment.justification = justification_text
end
amendments << amendment
break if options[:parse_only_one]
......
......@@ -13,6 +13,11 @@ Amendement <%= amendment.num %>
|width="50%"|
<%= changed %>
<% end -%>
<% if amendment.justification -%>
|-
| colspan="2" |
Justification: <%= amendment.justification %>
<% end -%>
|-
| colspan="2" |
Comments:
......
Markdown is supported
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