Sha256: 4f67e4987000963b4481eac393ce744486a1aa81fa1502c16d39b357149a00fe

Contents?: true

Size: 972 Bytes

Versions: 17

Compression:

Stored size: 972 Bytes

Contents

require "fileutils"

module IsoDoc
  module UN
    module BaseConvert
      def middle_clause(_docxml)
        "//clause[parent::sections]"
      end

      def admonition_parse(node, out)
        name = node.at(ns("./name"))
        out.div **admonition_attrs(node) do |t|
          admonition_name_parse(node, t, name) if name
          node.children.each do |n|
            parse(n, t) unless n.name == "name"
          end
        end
      end

      def inline_header_title(out, _node, title)
        out.span **{ class: "zzMoveToFollowing" } do |s|
          title&.children&.each { |c2| parse(c2, s) }
          clausedelimspace(_node, out) if /\S/.match?(title&.text)
        end
      end

      def is_plenary?(docxml)
        doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
        return true if %w(plenary agenda budgetary).include?(doctype)
        return true if docxml&.at(ns("//bibdata/ext/session/*"))

        false
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
metanorma-un-0.10.7 lib/isodoc/un/base_convert.rb
metanorma-un-0.10.6 lib/isodoc/un/base_convert.rb
metanorma-un-0.10.5 lib/isodoc/un/base_convert.rb
metanorma-un-0.10.4 lib/isodoc/un/base_convert.rb
metanorma-un-0.10.3 lib/isodoc/un/base_convert.rb
metanorma-un-0.10.2 lib/isodoc/un/base_convert.rb
metanorma-un-0.10.1 lib/isodoc/un/base_convert.rb
metanorma-un-0.10.0 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.13 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.12 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.11 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.10 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.9 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.8.1 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.8 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.7 lib/isodoc/un/base_convert.rb
metanorma-un-0.9.6 lib/isodoc/un/base_convert.rb