lib/metanorma/iso/validate.rb in metanorma-iso-2.5.0 vs lib/metanorma/iso/validate.rb in metanorma-iso-2.5.1

- old
+ new

@@ -32,11 +32,11 @@ def see_xrefs_validate(root) @lang == "en" or return root.xpath("//xref").each do |t| preceding = t.at("./preceding-sibling::text()[last()]") next unless !preceding.nil? && - /\b(see| refer to)\s*\Z/mi.match(preceding) + /\b(see| refer to)\p{Zs}*\Z/mi.match(preceding) (target = root.at("//*[@id = '#{t['target']}']")) || next target.at("./ancestor-or-self::*[@obligation = 'normative']") && !target.at("./ancestor::sections") and @log.add("Style", t, @@ -47,10 +47,10 @@ # ISO/IEC DIR 2, 15.5.3 def see_erefs_validate(root) @lang == "en" or return root.xpath("//eref").each do |t| prec = t.at("./preceding-sibling::text()[last()]") - next unless !prec.nil? && /\b(see|refer to)\s*\Z/mi.match(prec) + next unless !prec.nil? && /\b(see|refer to)\p{Zs}*\Z/mi.match(prec) unless target = root.at("//*[@id = '#{t['bibitemid']}']") @log.add("Bibliography", t, "'#{t} is not pointing to a real reference") next