module IsoDoc::UN::BaseConvert

Public Instance Methods

admonition_parse(node, out) click to toggle source
# File lib/isodoc/un/base_convert.rb, line 10
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
inline_header_title(out, node, title) click to toggle source
# File lib/isodoc/un/base_convert.rb, line 20
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
is_plenary?(docxml) click to toggle source
# File lib/isodoc/un/base_convert.rb, line 27
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
middle_clause(_docxml) click to toggle source
# File lib/isodoc/un/base_convert.rb, line 6
def middle_clause(_docxml)
  "//clause[parent::sections]"
end