Sha256: b3503dbc8c6520ad6d10750d72d6ec83211b40b3be4774d7f03076d8c392e5be

Contents?: true

Size: 963 Bytes

Versions: 42

Compression:

Stored size: 963 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(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

42 entries across 42 versions & 1 rubygems

Version Path
metanorma-un-0.7.0 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.13 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.12 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.11 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.10 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.9 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.8 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.7 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.6 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.5 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.4 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.3 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.2 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.1 lib/isodoc/un/base_convert.rb
metanorma-un-0.6.0 lib/isodoc/un/base_convert.rb
metanorma-un-0.5.16 lib/isodoc/un/base_convert.rb
metanorma-un-0.5.15 lib/isodoc/un/base_convert.rb
metanorma-un-0.5.14 lib/isodoc/un/base_convert.rb
metanorma-un-0.5.13 lib/isodoc/un/base_convert.rb
metanorma-un-0.5.12 lib/isodoc/un/base_convert.rb