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
a005e373
Commit
a005e373
authored
Apr 05, 2013
by
Michael Witrant
Browse files
fixed multiple bold
parent
3c3456a1
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
extract_amendments.rb
View file @
a005e373
...
...
@@ -132,7 +132,7 @@ class AmendmentExtractor
text
=
element
.
text
style
=
paragraph_style
if
text
.
present?
and
element
.
is_a?
Nokogiri
::
XML
::
Element
if
element
.
is_a?
Nokogiri
::
XML
::
Element
style_name
=
element
[
"text:style-name"
]
style
=
style_weight
(
style_name
)
if
style_name
end
...
...
@@ -144,10 +144,12 @@ class AmendmentExtractor
result
=
[]
last_style
=
nil
parts
.
each
do
|
style
,
text
|
next
if
text
.
empty?
if
style
==
last_style
result
.
last
[
1
]
+=
text
else
result
<<
[
style
,
text
]
last_style
=
style
end
end
...
...
samples/sample3.xml
0 → 100644
View file @
a005e373
This diff is collapsed.
Click to expand it.
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