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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a89c615f613daca6054a2f6273a69ed1a4a2dd1d
4
- data.tar.gz: c174498247a47e8d5e0e9e5b371da29bcb1a2067
3
+ metadata.gz: 29d5b0ee6b0279b9e4027e9404d19dcf5e349c4b
4
+ data.tar.gz: 0a230456ee1ca51b2852915c5b34d3249976a8f5
5
5
  SHA512:
6
- metadata.gz: c8a12f714b55740e555271575a6683fc02fc4c29450c281fc1915f99b68485fd84d11c222a906bdc9db4c919f8ab5ff4021e5ebe97065132efa782b055bb7f30
7
- data.tar.gz: 24be637cf6510ce7da8d4b3648f4b3cc6dd7ef7c9a38b24aaac2f5a6089c2d2f0a300e76acd6ccff21b2adec89980d07d6c26bdccaef9cb3b59b65c23c4a967e
6
+ metadata.gz: 411c35320f5bed2fa3abcee0477df3921e8cfb67063a6b128185f8ccf1467f5f663c5fe56f5dd3cf3cd24c1eaa1fe61aa9d3b0b4a8e79d34eb0c67ba92b806bf
7
+ data.tar.gz: 5c94b2d03477b9b7f1b11c6f34641839efe5b73bd2e86c56ad59e7b37d0143ba38012c8ba20c438dde71c58f9588a5318202432d350b0faa7e60758f44d43880
@@ -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
- val_attr = tbl_node.xpath('.//w:tblStyle').last.attributes['val']
303
- table_hash["doc#{doc_cnt}"][val_attr.value.to_s] = tbl_cnt
304
- val_attr.value = val_attr.value.gsub(/[0-9]+/, tbl_cnt.to_s)
305
- tbl_cnt += 1
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|
@@ -1,3 +1,3 @@
1
1
  module Omnidocx
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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: 2019-03-18 00:00:00.000000000 Z
11
+ date: 2020-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri