Sha256: d67596e360ca3d6d98902bcc0393f0300317448431d0dbc9ec5acdf87670931d

Contents?: true

Size: 426 Bytes

Versions: 8

Compression:

Stored size: 426 Bytes

Contents

require "isodoc"

module IsoDoc
  module CC
    module BaseConvert
      def cleanup(docxml)
        super
        term_cleanup(docxml)
      end

      def term_cleanup(docxml)
        docxml.xpath("//p[@class = 'Terms']").each do |d|
          h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
          h2.add_child(" ")
          h2.add_child(d.remove)
        end
        docxml
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
metanorma-cc-1.5.6 lib/isodoc/cc/base_convert.rb
metanorma-cc-1.5.5 lib/isodoc/cc/base_convert.rb
metanorma-cc-1.5.4 lib/isodoc/cc/base_convert.rb
metanorma-cc-1.5.3 lib/isodoc/cc/base_convert.rb
metanorma-cc-1.5.2 lib/isodoc/cc/base_convert.rb
metanorma-cc-1.5.1 lib/isodoc/cc/base_convert.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-cc-1.5.0/lib/isodoc/cc/base_convert.rb
metanorma-cc-1.5.0 lib/isodoc/cc/base_convert.rb