omnidocx 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/omnidocx.rb +7 -4
- data/lib/omnidocx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29d5b0ee6b0279b9e4027e9404d19dcf5e349c4b
|
|
4
|
+
data.tar.gz: 0a230456ee1ca51b2852915c5b34d3249976a8f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 411c35320f5bed2fa3abcee0477df3921e8cfb67063a6b128185f8ccf1467f5f663c5fe56f5dd3cf3cd24c1eaa1fe61aa9d3b0b4a8e79d34eb0c67ba92b806bf
|
|
7
|
+
data.tar.gz: 5c94b2d03477b9b7f1b11c6f34641839efe5b73bd2e86c56ad59e7b37d0143ba38012c8ba20c438dde71c58f9588a5318202432d350b0faa7e60758f44d43880
|
data/lib/omnidocx.rb
CHANGED
|
@@ -299,10 +299,13 @@ module Omnidocx
|
|
|
299
299
|
#updating the stlye ids in the table elements present in the document content XML
|
|
300
300
|
doc_content = doc_cnt == 0 ? @main_body : Nokogiri::XML(zip_file.read(DOCUMENT_FILE_PATH))
|
|
301
301
|
doc_content.xpath("//w:tbl").each do |tbl_node|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
302
|
+
style_last = tbl_node.xpath('.//w:tblStyle').last
|
|
303
|
+
unless style_last.nil?
|
|
304
|
+
val_attr = style_last.attributes['val']
|
|
305
|
+
table_hash["doc#{doc_cnt}"][val_attr.value.to_s] = tbl_cnt
|
|
306
|
+
val_attr.value = val_attr.value.gsub(/[0-9]+/, tbl_cnt.to_s)
|
|
307
|
+
tbl_cnt += 1
|
|
308
|
+
end
|
|
306
309
|
end
|
|
307
310
|
|
|
308
311
|
zip_file.entries.each do |e|
|
data/lib/omnidocx/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omnidocx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Parth Nagori
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|