Method: IsoDoc::WordFunction::Body#dl_parse

Defined in:
lib/isodoc/word_function/body.rb

#dl_parse(node, out) ⇒ Object



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/isodoc/word_function/body.rb', line 107

def dl_parse(node, out)
  out.table **{ class: "dl" } do |v|
    node.elements.select { |n| dt_dd? n }.each_slice(2) do |dt, dd|
      v.tr do |tr|
        tr.td **{ valign: "top", align: "left" } do |term|
          dt_parse(dt, term)
        end
        tr.td **{ valign: "top" } do |listitem|
          dd.children.each { |n| parse(n, listitem) }
        end
      end
    end
    dl_parse_notes(node, v)
  end
end