Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
amendments
Commits
f49569f3
Commit
f49569f3
authored
Apr 05, 2013
by
Michael Witrant
Browse files
works with repeat-block emend
parent
c84967da
Changes
1
Hide whitespace changes
Inline
Side-by-side
extract_amendments.rb
View file @
f49569f3
...
...
@@ -64,11 +64,11 @@ class AmendmentExtractor
amend_nodes
=
[]
text
.
children
.
each_with_index
do
|
node
,
i
|
if
node
.
search
(
"[text()='<Amend>']"
).
size
>
0
if
node
.
search
(
"[text()='<Amend>']"
).
size
>
0
or
node
.
search
(
"[text()='<RepeatBlock-Amend><Amend>']"
).
size
>
0
amend_start
=
i
elsif
node
.
search
(
"[text()='</Amend>']"
).
size
>
0
if
amend_start
.
nil?
raise
"amend end before amend start"
raise
"amend end before amend start
(
#{
node
.
path
}
)
"
end
amend_end
=
i
amend_nodes
<<
text
.
children
.
slice
(
amend_start
..
amend_end
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment