isodoc 3.7.7 → 3.7.8

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
  SHA256:
3
- metadata.gz: f5e6a59ece60d88c1ec940f5a34612fd4290dcdfb9737528713152c2eb7dbe20
4
- data.tar.gz: a59beb605f4e93e76be88d82567d96b3c34534479805db7c07b3b3b228a29766
3
+ metadata.gz: cdda29c5e2ec54e77bb977a7f736b5cd215e3d54dfccf06213a0cb620bd111a7
4
+ data.tar.gz: 94ca91d475ff5554300c74d15fcb0a68a08166728103d52e688e931f030f67bc
5
5
  SHA512:
6
- metadata.gz: 858f4a2255c6a3a0fb7150dd6e4c13e81cfc49369e454e89c2bf7b2327d5b61bf1ac8b1075938c4a8b5d00310c4a525d4100287690e9816c3486a7ace5e307e9
7
- data.tar.gz: 7f900ddbf4c9f128141550d1172e5805f974a91b649a11613b7cc4a52ddf5839a91df107d34d3eea459dadc6720c8f763f8c974c7d4b488dda8a18f1bea81a9e
6
+ metadata.gz: 2a1d38eab37a9aa533e94adc24e75414927376b65d9c0acca578c4009f688c4508abf5c4589f5352605087f45edb5c35af459f2b47868d5729caf4d029a1c754
7
+ data.tar.gz: 2c19a2c45d35869b011beaa785ea5938c338a6a06acceb66a1b6378bfad2edc9dcf47ca1cf259b601790f584d351cb5058c16fa3b506c991ba6c78efb3d7adcd
@@ -136,6 +136,8 @@ module IsoDoc
136
136
  # detect whether string which may contain XML markup is empty
137
137
  def empty_xml?(str)
138
138
  str.blank? and return true
139
+ # plain text (no markup, no entity refs): emptiness is just whitespace
140
+ !str.include?("<") && !str.include?("&") and return str.strip.empty?
139
141
  x = Nokogiri::XML::DocumentFragment.parse(str)
140
142
  x.to_str.strip.empty?
141
143
  end
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.7.7".freeze
2
+ VERSION = "3.7.8".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.7
4
+ version: 3.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.